[Chicago-talk] get array element from a function return
imranjj at gmail.com
Fri Dec 3 12:56:16 PST 2010
> What's wrong with command below?
> :) ls -l | perl -nle 'print (split)'
> syntax error at -e line 1, near ")["
> Execution of -e aborted due to compilation errors.
ls -l | perl -nle 'print [split]->'
ls -l | perl -nle 'split; print @_'
I think "split" does not like being unassigned. it will in that case
assign the return to @_.
More information about the Chicago-talk