[Chicago-talk] get array element from a function return

Shlomi Fish shlomif at iglu.org.il
Sat Dec 4 02:10:04 PST 2010


On Saturday 04 December 2010 01:54:39 Michael Potter wrote:
> What are you trying to do?
> 
> Does this help:
> ls -l | perl -nle 'print ((split)[0])'
> 

«ls -l | perl -nle 'print +(split)[0]'» will also work. Also see the -a and -F 
options to Perl.

Regards,

	Shlomi Fish

> The parens are being seen at the attached to the print, rather than
> wrapping the split.
> 

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
What does "Zionism" mean? - http://shlom.in/def-zionism

<rindolf> She's a hot chick. But she smokes.
<go|dfish> She can smoke as long as she's smokin'.

Please reply to list if it's a mailing list post - http://shlom.in/reply .


More information about the Chicago-talk mailing list