Help for this page

Select Code to Download


  1. or download this
    sub save {
        my($file, $data) = @_;
    ...
        }
        return wantarray ? %hash : \%hash;
    }
    
  2. or download this
    my %one = ( a => 'alpha', z => 'zeta', b => 'beta');
    save("data.txt", \%one);
    ...
    printf "a stands for %s\n", $one{a};
    printf "b stands for %s\n", $two->{b};
    printf "z stands for %s\n", $three{z};