- or download this
perl -MFcntl=:flock -e 'print 2+LOCK_EX'
- or download this
perl -wle 'print $^W*2**$^W*2'
- or download this
#!/usr/bin/perl -w
...
print "Pick another integer between 1 and 3\n";
$num += <STDIN>;
print "The sum is " . $num;
- or download this
perl -wle '%h = map {(qq{sum}) => $h{'sum'}+=$_ } qw/2 2/; print $h{s
+um}'
- or download this
#!/usr/bin/perl -w
...
my %foo;
%foo = map {('sum') => $foo{'sum'}+=$_ } qw/2 2/;
print $foo{sum};