in reply to Re: Example of push
in thread Example of push
/$_/ must be re-compiled each time the value of $_ changes. Though this won't matter much in this instance, because of the relatively few number of iterations, a better way to do this would be to change the contents of @regex from:$error=~/$_/
to:my @regex=('\bcannot verify', '\bcorrupt file', '\bskipped', );
or even:my @regex=( qr/\bcannot verify/, qr/\bcorrupt file/, qr/\bskipped/, );
my @regex = map qr/$_/, ( '\bcannot verify', '\bcorrupt file', '\bskipped', );
|
|---|