Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: =~ doesn't work with Quantum::Superpositions

by DrManhattan (Chaplain)
on Apr 20, 2003 at 15:57 UTC ( #251834=note: print w/replies, xml ) Need Help??


in reply to =~ doesn't work with Quantum::Superpositions

Looks like eq is overloaded, but =~ is not. When you make a regex comparison, you're just getting a regex match against the stringified object (in this case "any(a,b)") on the LHS.
use Quantum::Superpositions; # Create a disjunction of 'a' and 'b'. $dis = any( 'a', 'b' ); $dis =~ /.*/ && print $&;
Prints "any(a,b)"

-Matt

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://251834]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2018-04-26 08:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?