- or download this
open my $fh, '>', $file_name or die "Cannot open $file_name: $!";
- or download this
my %handles = get_write_handles(qw/col1.txt col2.txt col3.txt/);
...
}
return %file_handles;
}
- or download this
print { $handles{'in.txt'} } "something\n";
- or download this
foreach (values %handles) {
print $_ "something\n";
}
- or download this
sub get_read_handles {
my @file_names = @_;
...
}
return @file_handles;
}
- or download this
sub get_append_handles {
my @file_names = @_;
...
}
return @file_handles;
}