Help for this page

Select Code to Download


  1. or download this
    my %h = (
    sub { return sprintf ("0x%x", shift) },
    sub { return sprintf ("%b", shift) },
    sub { return sprintf ("%d", shift) },
    );
    
  2. or download this
    $result = process_args(1, 2, 3, 4);
    print "Result is $result \n";
    ...
         print "Arg array is now: @_ \n";
         return $c + $d;
    }
    
  3. or download this
    my %h = (
    hex => sub { return sprintf ("0x%x", shift) },
    bin => sub { return sprintf ("%b", shift) },
    dec => sub { return sprintf ("%d", shift) },
    );
    
  4. or download this
    my $hex_val = $h{hex}->(5);
    
  5. or download this
    print "Arg array is now: @_ \n";