- or download this
use strict;
use warnings;
- or download this
use FileHandle;
- or download this
for (my $i = 0; $i < @myArr; $i++) {
- 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
- or download this
#we're starting a new subroutine
sub write_value_to_file {
...
close $fh;
#close the function
}