I have a pattern matching problem that isn't strictly VMS related (although I amd running on VMS perl).
I want to make a perl regexp that will match an @ starting at the beginning of the string followed by any characters. (Actually I lied. The pattern I want to ultimately match is a bit more complicated but I narrowed the fact that it won't match as I expect down to this problem.) Anyway I thought that it would be this: /[EMAIL PROTECTED]/ or maybe this: /[EMAIL PROTECTED]/ but I can't get it to match. Can anyone explain the behavior of the following program: Why don't all the matches match? Here's the program: LASSIE> ty z.pl $toline = "@"; $match = $toline =~ /^\@/; print "\$match is $match\n"; $toline = "@T"; $match = $toline =~ /[EMAIL PROTECTED]/; print "\$match is $match\n"; $match = $toline =~ /[EMAIL PROTECTED]/; print "\$match is $match\n"; $match = $toline =~ /[EMAIL PROTECTED]/; print "\$match is $match\n"; ---------------------------------------- And its output: LASSIE> perl z.pl $match is 1 $match is $match is $match is ---------------------------------------- Why don't the last three match too? I have got to be missining something. Thanks in advance, Karol ============================== Karol E. Zielonko Jr. OpenVMS Engineering Hewlett-Packard Company If you have me in your address book please configure the entry to indicate that I prefer to receive plain text.
