in reply to Re^3: Multiple foreach loops in single statement
in thread Multiple foreach loops in single statement
perl -e '@lines=`cat file.pl`;print $#lines,"\n", $lines[2];'
Output:
this returns a list infact - a list of strings after pumping in entire file splitted on newline.18 use Unicode::Collate::Locale;
And we are providing this list in place of an EXPR in split which makes it a point that we can provide a list too instead of a string.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Multiple foreach loops in single statement
by Anonymous Monk on Oct 24, 2012 at 13:30 UTC | |
|
Re^5: Multiple foreach loops in single statement
by Athanasius (Archbishop) on Oct 24, 2012 at 13:56 UTC | |
|
Re^5: Multiple foreach loops in single statement
by ikegami (Patriarch) on Mar 02, 2013 at 22:54 UTC |