perlavi has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have problems in unless condition because of which I am not getting the desired output. This is as per my analysis but my code may have some other issues also which can be surely pointed out here to get the desired output. I am getting the output as below.
Memory
Network Port
Physical Cpu
Virtual Disk
Group Cpu
My desired output is as below.
Memory
Physical Cpu
Can somebody let me know what am I missing?
Also, as this is my first post here, please bare with my style of putting up question.
@::FileLines contains lines from a txt file as below.foreach my $line (@::FileLines) { unless(grep(/$pattern/,$line)){ my @karatSplit = split('\^', $line); print "$karatSplit[1]\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: unless condition not working
by Anonymous Monk on Dec 04, 2011 at 17:45 UTC | |
by perlavi (Initiate) on Dec 05, 2011 at 06:53 UTC | |
by Anonymous Monk on Dec 05, 2011 at 08:11 UTC | |
|
Re: unless condition not working
by Anonymous Monk on Dec 05, 2011 at 08:18 UTC | |
|
Re: unless condition not working
by TJPride (Pilgrim) on Dec 05, 2011 at 14:23 UTC | |
by perlavi (Initiate) on Dec 10, 2011 at 04:04 UTC |