in reply to perlish way of splitting file records
Oddly enough, to use a list slice there are some subtle parenthesis issues:print [ split(/:/,<FILEHANDLE>) ]->[3]
I'm guessing the second example has some ambiguity with taking the slice off the print or the split# this works: print ((split /:/, <FILEHANDLE>)[3]); # doesn't work (note the missing outer parenthesis): print (split /:/, <FILEHANDLE>)[3];
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: perlish way of splitting file records
by VSarkiss (Monsignor) on Jun 01, 2006 at 16:39 UTC | |
Re^2: perlish way of splitting file records
by ikegami (Patriarch) on Jun 01, 2006 at 17:25 UTC |