You could do a series of if..elsif..elsifs, if you preferred.my ($tot, $gcount, $ccount, $ocount); while (<>) { $tot=$1 if /^Total count\s+(\d+)/; $gcount = $1 if /^G\s+(\d+)/; $ccount = $1 if /^C\s+(\d+)/; $ocount = $1 if /^Other\s(\d+)/; }
In reply to Re: Regular Expn Problem
by Roy Johnson
in thread Regular Expn Problem
by venkatr_n
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |