When your code doesn't work as expected, one debug technique is to use B::Deparse to see what code you are actually running (Tip #6 from the Basic debugging checklist). This shows that those angle brackets are really File::Glob:
perl -MO=Deparse 844275.pl print "Customer abbreviation:\t \t"; $cust = <STDIN>; print "\n"; chomp $cust; use File::Glob (); until ($cust =~ glob('w{3,4}')) { print "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"; print "!!! !!!\n"; print "!!! ABBREVIATION MUST BE 3 OR 4 CHARACTERS !!!\n"; print "!!! !!!\n"; print "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"; print "\n"; print "Customer abbreviation:\t \t"; $cust = <STDIN>; chomp $cust; print "\n"; }
In reply to Re: problem with pattern match
by toolic
in thread problem with pattern match
by ddrew78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |