![]() |
|
We don't bite newbies here... much | |
PerlMonks |
Unable to extract elements from a split. Kindly Help.by perl514 (Pilgrim) |
on Dec 24, 2011 at 04:22 UTC ( #945012=perlquestion: print w/replies, xml ) | Need Help?? |
perl514 has asked for the wisdom of the Perl Monks concerning the following question: Venerated Monks, I am trying to split a command output in an array and then print one specific line of it. Also trying to further split each line in words and count the occurances. For the second part of counting occurences, I will be referring the excellent node Count and List Items in a List. But before I do that, I need to break down the command as shown above. Kindly note that the "ping localhost" command is only being used as an example. I need to run some other commands and am using this only as an example. I wanted to give a sample output of those commands here, but to do that, I'd need to login to my office network and my remote connectivity to office VPN is disabled and will be resolved only by next 3-4 days. :( I am getting an error message that states "Use of uninitialized value $eachlinecmd[4] in concatenation (.) or string at split.pl line 9." and "Use of uninitialized value $eachwordcmd[3] in concatenation (.) or string at split.pl line 10." Given below is my script
And here is the output
Kindly help Perlpetually Indebted To PerlMonks
Back to
Seekers of Perl Wisdom
|
|