Where and with what is $_ being assigned? If $_ does not match the pattern, the while loop will never be entered. If $_ does match, the while loop will be infinite.
Please see Short, Self-Contained, Correct Example.c:\@Work\Perl\monks>perl -wMstrict -le "$_ = 'no joy'; ;; my $output = ''; while($_ =~ /\A([S\-\+XIO]+)\z/g) { my $part = $1; $output = $output . $part; } print qq{final output: '$output'}; " final output: ''
In reply to Re: Pattern matching fails because of special characters
by AnomalousMonk
in thread Pattern matching fails because of special characters
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |