Irishboy24 has asked for the wisdom of the Perl Monks concerning the following question:
Here is what i tried.cat Arsenal Cech Bellerin,Per,Koscielny,Nacho Ramsey,Coquelin Alexis,Ozil,Welbeck Giroud
Output:filehandler.pl sub read_file { @lines = <>; chomp(@lines); print join (',',@lines) . "\n"; } read_file;
I'm able to print the output on the terminal as comma delimited but i'm stuck as to how to iterate through the o/p and print each element in Array./filehandler.pl Arsenal Cech,Bellerin,Per,Koscielny,Nacho,Ramsey,Coquelin,Alexis,Ozil,Welbeck, +Giroud
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading File Into Array
by ww (Archbishop) on Mar 28, 2016 at 02:46 UTC | |
by Irishboy24 (Sexton) on Mar 28, 2016 at 03:28 UTC | |
by ww (Archbishop) on Mar 28, 2016 at 10:15 UTC | |
by Irishboy24 (Sexton) on Mar 28, 2016 at 03:51 UTC | |
by ww (Archbishop) on Mar 28, 2016 at 10:31 UTC | |
|
Re: Reading File Into Array
by BrowserUk (Patriarch) on Mar 28, 2016 at 03:14 UTC | |
|
Re: Reading File Into Array
by dasgar (Priest) on Mar 28, 2016 at 02:11 UTC | |
by Irishboy24 (Sexton) on Mar 28, 2016 at 02:39 UTC | |
|
Re: Reading File Into Array
by GotToBTru (Prior) on Mar 28, 2016 at 16:58 UTC |