New reply for new question... Just list the important domains in @domainlist:
@domainlist = qw(hostname.foo.com host1-name.foo.com); @DISKD = <inputfile>; foreach $domain (@domainlist) { @value = grep { /\b\Q$domain\E\b/ } @DISKD; for $value (@value) { @data = split /\s+/, $value; $sum += $data[$#data]; } }
In reply to Re: Regex how to update
by ikegami
in thread Regex how to update
by frank_2k4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |