Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    
  2. or download this
    use FileHandle;
    
  3. or download this
    for (my $i = 0; $i < @myArr; $i++) {
    
  4. or download this
    # set $value to the value held in the array position we're on
    my $value = $myArr[$i]; 
    ...
    # call our function below with our current value and filename
    } 
    # end the for block
    
  5. or download this
    #we're starting a new subroutine
    sub write_value_to_file {   
    ...
    close $fh;     
    #close the function
    }