Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://251834]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2023-12-10 06:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (38 votes). Check out past polls.

    Notices?