sravs448 has asked for the wisdom of the Perl Monks concerning the following question:
The command to get result has the following outputmy @result = (`cmd to get result`) ; foreach $result (@result) { @streams = ; @spaces = ; }
I would like to get the 1st word (before space) and which has "Y" at the ending to an array @streams and for rest of lines only 1st word (before space) to array @spaces like shown below.ws.abc.dsfsfsfwerfrwef std 13232 ws.dfsdferferfregregrgr std 99868 Y ws.abc.asddwefewfewfewf std 45345 fwfrwfrefergegregerefds std 36754 Y ws.abc.fferfergregrfreg std 45435
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl : Split/Regex
by AppleFritter (Vicar) on Sep 03, 2014 at 21:09 UTC | |
by johngg (Canon) on Sep 03, 2014 at 23:01 UTC | |
by AppleFritter (Vicar) on Sep 03, 2014 at 23:08 UTC | |
by 2teez (Vicar) on Sep 03, 2014 at 23:19 UTC | |
by AppleFritter (Vicar) on Sep 03, 2014 at 23:29 UTC | |
| |
by GrandFather (Saint) on Sep 03, 2014 at 23:47 UTC | |
by AnomalousMonk (Archbishop) on Sep 04, 2014 at 00:57 UTC | |
by GrandFather (Saint) on Sep 04, 2014 at 01:48 UTC | |
| |
|
Re: Perl : Split/Regex
by AnomalousMonk (Archbishop) on Sep 04, 2014 at 00:27 UTC | |
|
Re: Perl : Split/Regex
by hdb (Monsignor) on Sep 04, 2014 at 06:05 UTC | |
|
Re: Perl : Split/Regex
by 2teez (Vicar) on Sep 03, 2014 at 22:55 UTC |