PREVIOUS  TABLE OF CONTENTS 

The Perl Journal One-Liners

TPJ One-Liner #1

Adding a long list of numbers on the command line:

perl -e ’print eval join("+", @ARGV)’ 6 10 20 11
9 16 17 28 100 33333 14 -7

TPJ One-Liner #2

A cheap alarm clock:

perl -e ’sleep(120); while (1) { print "\a" }’


PREVIOUS  TABLE OF CONTENTS