Help for this page

Select Code to Download


  1. or download this
    my @x = 1 .. 5;
    sub get_x { @x }
    ...
        $v *= 2;
    }
    print "@x\n";
    
  2. or download this
    while (my ($k, $v) = each %hash) {
        $hash{ $k . 'a' } = 1;
    ...
    foreach my $k (keys %hash) {
        $hash{ $k . 'a' } = 1;
    }