Help for this page

Select Code to Download


  1. or download this
    while (<>) {
        # do something with $_ here
    }
    
  2. or download this
    unshift(@ARGV, '-') unless @ARGV;
    while ($ARGV = shift) {
    ...
            # do something with $_
        }
    }
    
  3. or download this
    %hash = ();
    {
    ...
            $hash { $keys [$c] } = $values [ $c ];
        }
    }
    
  4. or download this
    @hash { qw (a, b, c) } = 1..3;
    
  5. or download this
    { # block for local
        local $/ = ''; # paragraph mode
    ...
            } # end of sub
        );
    } # end of "local $/" block