APM: and today, I learnt something new

Steve Marvell steve at parasolsolutions.com
Thu Dec 20 09:08:08 CST 2001


.. and ... are more than I ever thought. 

perl -pe '11..exit'

That appears to be the same as head -10, though I'm not sure why you
wouldn't do:

perl -pe '$. > 10 && exit'

Cos that's just more readable.

And this is something quite fun.

perl -e 'while (1) { ++$i == 10 ... --$i == 0;  print "$i\n";}'

Steve



More information about the Devoncornwall-pm mailing list