Help for this page

Select Code to Download


  1. or download this
    $ cat a.c
    #include <stdio.h>
    ...
    
    $ gcc -o a a.c && a
    Stop blaming Perl for your own mistakes!
    
  2. or download this
    $ perl -e'printf "%.20e\n", $_ for @ARGV' 0.45 0.92 0.37
    4.50000000000000011102e-01
    9.20000000000000039968e-01
    3.69999999999999995559e-01
    
  3. or download this
    $ perl -le 'print abs(5056.45 + 10112.92 - 15169.37) < 0.0001 ? "as ex
    +pected" : "perl math sucks!"'
    as expected
    
    $ perl -le 'print sprintf("%.4f", 5056.45 + 10112.92) eq sprintf("%.4f
    +", 15169.37) ? "as expected" : "perl math sucks!"'
    as expected