Alternatively you can assign to your variable directly in list context:
($rs[2]) = $dorient =~ /^([^_]+)_/;$rs[2] will be undefined, when the match wasn't successful.
In reply to Re: resetting Perl RegEx backreferences
by pKai
in thread resetting Perl RegEx backreferences
by samizdat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |