Help for this page

Select Code to Download


  1. or download this
    my $foo = "bar";
    sub bad_example { $_[0] =~ s/a/oo/; $_[0] }
    print "\$foo: $foo\n";
    print "bad_example returns: ", bad_example( $foo ), "\n";
    print "uh oh, \$foo: $foo\n";
    
  2. or download this
    sub take_one_and_hash {
      my $one = shift;
    ...
    
      ## frobulate $one based on %hash . . .
    }