Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    }
    
    print x; #prints 5
    
  2. or download this
    sub x1
    {
    ...
    print x1; #still prints 5! Whoa!
    #"return'" returns value of last true statement.
    #if you don't specify something else for it to return.
    
  3. or download this
    sub x2
    {
    ...
    }
    
    print "x2:",x2; #prints "x2:" , ie nothing from sub x2
    
  4. or download this
    @outputlist = map{..code...}@inputlist;