in reply to die in regexp
(don't use $a or $b as a varname -- it's a global var for sort)my $s = "qwe"; croak "w is bad" if $s =~ /w/; # croak if the string contains a w # OR, faster: croak "w is bad" if index($s,'w') >= 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: die in regexp
by powerman (Friar) on Jul 03, 2006 at 19:25 UTC | |
by Hue-Bond (Priest) on Jul 03, 2006 at 20:05 UTC | |
by powerman (Friar) on Jul 03, 2006 at 20:39 UTC | |
by graff (Chancellor) on Jul 03, 2006 at 21:51 UTC |