use strict; use warnings; my $pattern = 'Win2k8_Trace_db|Win2k3_test \(e4ba25c7-5628-45d8-97a7-8 +3331e7ad7e1\)|iserver7 \(035e60d4-3073-4fcc-a78e-6a718b3b502f\)|iserv +er6 \(b93b57e2-ab74-441a-98a7-35dc71feca12\)'; @::FileLines = <DATA>; for (@::FileLines) { chomp; next if !$_ || m/$pattern/; @_ = split /\^/; print "$_[1]\n"; } __DATA__ Memory^Memory^Free MBytes,80124,85490,81912.39,100,Alert,Migrate high +memory consuming VM to another host.^M DvsPortset-0:130066:Win2k3_test (e4ba25c7-5628-45d8-97a7-83331e7ad7e1) +^Network Port^% Outbound Packets Dropped,0.00,0.00,0,0,OK, DvsPortset-0:130066:Win2k3_test (e4ba25c7-5628-45d8-97a7-83331e7ad7e1) +^Network Port^% Received Packets Dropped,0.00,0.00,0,0,OK, _Total)^Physical Cpu^% Processor Time,0.63,13.49,6.27,0,OK, Win2k3_test (e4ba25c7-5628-45d8-97a7-83331e7ad7e1)^Virtual Disk^Comman +ds/sec,0.00,6.72,2,0,OK, iserver6 (b93b57e2-ab74-441a-98a7-35dc71feca12)^Virtual Disk^Writes/se +c,0.00,21.26,1.63,0,OK, iserver7 (035e60d4-3073-4fcc-a78e-6a718b3b502f)^Virtual Disk^Commands/ +sec,0.00,104.15,18.96,0.49,OK, Win2k8_Trace_db^Group Cpu^% Used,0.55,8.88,4.07,0,OK,
In reply to Re: unless condition not working
by TJPride
in thread unless condition not working
by perlavi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |