Help for this page

Select Code to Download


  1. or download this
    my $num = 4.62899;
    $round = sprintf "%.2f", $num;
    print "$round\n";
    
  2. or download this
    my $string = "0.0";
    print "string $string is ", ($string ? "True" : "False"), "\n";
    print "string $string is ", ($string+0 ? "True" : "False"), "\n";