my $query = undef;
if ($query =~ /^(([\w\d\-\_]+)[:,]|)(.*)$/) {
# we get here!
print "$`|$1|$2|$3|$4|$'|$query|";
} else {
exit;
}
__END__
|||||||
C:\>perl -v
This is perl, v5.8.4 built for MSWin32-x86-multi-thread
nothing matches nothing or nothing :)
C:\>perl -le"print 1 if undef =~ //"
1
C:\>perl -le"print 1 if undef =~ /|/"
1
C:\>perl -le"print 1 if undef =~ /blahblah|/"
1
What you say happens with 5.6.1
doesn't sound sounds questionable (I haven't checked the perlbug database).
MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!" |
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README). |
** The third rule of perl club is a statement of fact: pod is sexy. |