in reply to Reading File Into Array
You know that your output will have a different number of lines than your input, so you need to deal with the step of turning one input line into multiple output lines.
sub read_file { @lines = <>; chomp(@lines); for $line (@lines) { print join "\n", split ',', $line; print "\n" } } read_file;
$: perl 1158919.pl < Arsenal Cech Bellerin Per Koscielny Nacho Ramsey Coquelin Alexis Ozil Welbeck Giroud $:
|
|---|