in reply to Re: What is the best way to compare variables so that different types are non-equal?
in thread What is the best way to compare variables so that different types are non-equal?
Regex pattern objects are magical. Overloading doesn't even come into play.
so what about this???
output: overloadedpackage Regexp; use overload q{""} => sub {return "overloaded" } ; package main; my $rx = qr/a/; print $rx;
Cheers Rolf
UPDATE: Finally got it! 8)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: What is the best way to compare variables so that different types are non-equal?
by ikegami (Patriarch) on Jul 20, 2009 at 08:09 UTC |
In Section
Seekers of Perl Wisdom