Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^9: Split tab-separated file into separate files, based on column name ( Operator overloading )

by LanX (Sage)
on Aug 27, 2020 at 12:50 UTC ( #11121127=note: print w/replies, xml ) Need Help??


in reply to Re^8: Split tab-separated file into separate files, based on column name ( Operator overloading )
in thread Split tab-separated file into separate files, based on column name

> 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

  • Comment on Re^9: Split tab-separated file into separate files, based on column name ( Operator overloading )
  • Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11121127]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (1)
As of 2023-06-08 05:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you go to conferences?






    Results (29 votes). Check out past polls.

    Notices?