[Milan-pm] Perl bug?

Hakim Cassimally hakim.cassimally at gmail.com
Wed Dec 2 10:13:54 PST 2009


2009/12/2 Max M <minimal.oasis+milan-pm at gmail.com>:
> Trying to fix a strange behaviour in a script of mine, I found out
> something very much resembling a bug.
>
> The following code dies (either under perl 5.10 or 5.8).
>
>        "a" =~ /./;   # [1]
>
>        if ( not  "" =~ // ) {
>            die "bug????"
>        }
>
> If line [1] is commented out, it no longer dies.

It's not a bug (though arguably it's a misfeature...)

   //  matches the last pattern matched

(I can't see where this is documented though... perldoc perlre ?)

osfameron


More information about the Milan-pm mailing list