in reply to Re: Using IF and OR, I'm sure there is a better way
in thread Using IF and OR, I'm sure there is a better way
Using $& can slow down regexps elsewhere in the program, so replace
print $& if ($variable=~/[123]/);
with
print $1 if ($variable=~/([123])/);
|
|---|