Help for this page

Select Code to Download


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