Help for this page

Select Code to Download


  1. or download this
    sub func {
      local $_;   # THIS IS THE KEY LINE YOU NEEDED
    ...
    The file is ree1
    The file is ree2
    Files: ree ree1 ree2
    
  2. or download this
    use strict;
    use warnings;
    ...
      }
      return @aResults;
    }
    
  3. or download this
    my @people = (bob => 53, peter => 200);
    my @hello = forEveryOther { "Hello, $_\n" } @people;
    ...
    # outputs
    Hello, bob
    Hello, peter