Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
> I don't see how the logic is compatible

Set operations have a natural analogy to Boolean operations.

And in mathematics and CS and and or are often replaced with * and + notations, especially in pre-LaTeX documents.

That's because the truth tables are the same

*/AND 0 1 0 0 0 1 0 1 +/OR 0 1 0 0 1 1 1 2 (2 is true here)

Arithmetic operators + - * / are also "close" in precedence, associativity and context (see perlop ) and the grouping rules are well known.

Furthermore is comparison with < > => <= obvious here.

Also the duplicity of == and eq for comparison comes handy (same "set object" or same "set elements")

> STRING * 3 to be equivalent to STRING + STRING + STRING.

not sure what you mean set elements are unique, if you refer to power-sets the cross operator x or power ** may be the better choice.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

In reply to Re^9: Split tab-separated file into separate files, based on column name ( Operator overloading ) by LanX
in thread Split tab-separated file into separate files, based on column name by Anonymous Monk

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2023-09-25 00:44 GMT
Find Nodes?
    Voting Booth?

    No recent polls found