<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>Thanks,<br><br>What's wrong with command below?<br><br><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">:) ls -l | perl -nle 'print (split)[0]'</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">syntax error at -e line 1, near ")["</span><br style="font-family: Courier New,courier,monaco,monospace,sans-serif;"><span style="font-family: Courier New,courier,monaco,monospace,sans-serif;">Execution of -e aborted due to compilation errors.</span><br><br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight:
bold;">From:</span></b> imran javaid <imranjj@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> Chicago.pm chatter <chicago-talk@pm.org><br><b><span style="font-weight: bold;">Sent:</span></b> Fri, December 3, 2010 2:06:30 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Chicago-talk] get array element from a function return<br></font><br>
perl -le 'print qw(Sun Mon Tue Wed Thu Fri Sat)[(localtime)[6]]'<br><br>On Fri, Dec 3, 2010 at 1:59 PM, tiger peng <<a ymailto="mailto:tigerpeng2001@yahoo.com" href="mailto:tigerpeng2001@yahoo.com">tigerpeng2001@yahoo.com</a>> wrote:<br>> Hi,<br>> To get the weekday name of current day in Perl, I am using some thing like<br>> below. I do not like so many punctuation marks. Can it be simpler?<br>><br>> perl -le 'print [("Sun", "Mon", "Tue", "Wed", "Thu", "Fri",<br>> "Sat")]->[[localtime(time)]->[6]]'<br>><br>> _______________________________________________<br>> Chicago-talk mailing list<br>> <a ymailto="mailto:Chicago-talk@pm.org" href="mailto:Chicago-talk@pm.org">Chicago-talk@pm.org</a><br><span>> <a target="_blank" href="http://mail.pm.org/mailman/listinfo/chicago-talk">http://mail.pm.org/mailman/listinfo/chicago-talk</a></span><br>><br>_______________________________________________<br>Chicago-talk
mailing list<br><a ymailto="mailto:Chicago-talk@pm.org" href="mailto:Chicago-talk@pm.org">Chicago-talk@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br></div></div>
</div></body></html>