Hi! is there a regular expression I can use instead of my line of code 'if ( $county eq 26005 )' ?
Also, for lines that match '$county eq 26005' I need to count/total the corresponding '$yr_tot' field on the same line. How do you total a $scalar column in perl? there doesn't appear to be a function similar to sql's 'count'.There doesn't appear to be a function similar to a gasoline pump as well.
To answer your question: $total+=$yr_tot.
In reply to Re: regular expressions
by blazar
in thread regular expressions
by pugsly62
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |