On Thu, May 3, 2012 at 9:02 PM, Mikhael Goikhman <[email protected]> wrote:
> On 03 May 2012 12:20:44 +0300, ynon perek wrote: > > > > Following our meeting yesterday, you can find the keynote at: > > http://speakerdeck.com/u/ynonperek/p/perl-golf > > > > And the golf book at: > > http://terje2.frox25.no-ip.org/perlgolf_history_070109.pdf > > Seems like a nice talk that I missed. I'd like to report a glitch. > > The '&' trick as in "perl -pe '11..&'" or in your "Example: $-" slide > worked in older perl versions like 5.8, but this is now compile-time > rather than run-time error in 5.14. You may use '&:' for this however > that works in either version. > > Here is a useful line-based calculator: > > perl -ple '$_=eval' > > I prefer perl -de1 You have to explicitly prefix the expressions whose results you want to print with "p" or "x", but in return you get way more power. And it's shorter :-) > You could also mention $/ that is usually shorter than "\n" unless > you already started a (milti-line) string. And "perl -a" doing the > word split for you. :) > > Regards, > Mikhael. > > -- > perl -le'print$,.=chr(64+hex),-8x(16+$;--)for+split//,d9b815c07f9b8d1e0' > _______________________________________________ > Perl mailing list > [email protected] > http://mail.perl.org.il/mailman/listinfo/perl > -- Gaal Yahas <[email protected]> http://gaal.livejournal.com/
_______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl
