M
Monkey Boy
How do I initialise (assign value of 0) to multiple variables without
having to manually specify each one.
ie.
$a = 0;
$b = 0;
$c = 0;
$d = 0;
...etc
How to simplify this -
FILE is a mail log file, where I have to repeat the following regex on
multiple email address. I want to have all the email addresses in an
array where I can just call it up on just a single step in the while
loop instead of copying the below line multiple times per email
address.
while (<FILE>){
chomp;
if(/amavis/ && /Passed/ && ! /\<\>/ &&
/\-\>\s\<me\@emailaddress.com\>/i){
$a++;
}
Thanks
MB
having to manually specify each one.
ie.
$a = 0;
$b = 0;
$c = 0;
$d = 0;
...etc
How to simplify this -
FILE is a mail log file, where I have to repeat the following regex on
multiple email address. I want to have all the email addresses in an
array where I can just call it up on just a single step in the while
loop instead of copying the below line multiple times per email
address.
while (<FILE>){
chomp;
if(/amavis/ && /Passed/ && ! /\<\>/ &&
/\-\>\s\<me\@emailaddress.com\>/i){
$a++;
}
Thanks
MB