[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] So, you think you know Perl?



On Thu, Mar 29, 2001 at 08:40:16PM +0200, abigail@foad.org wrote:
>    1) Predict what 
>           echo "" | perl -ple 'print q'
>       does.

By the same token, (NPI) your nifty line counter can be rewritten:

perl -ne '$; ++}{; print $' 
# Spaces for decoration.

(Found when toying around with $} :  perl -ne '$}++}{print $}' )

-- 
And tomorrow will be like today, only more so.
		-- Isaiah 56:12, New Standard Version

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe