Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env perl
- use strict;
- use warnings;
- my($outputfh,$junkuserfh,$junkauthfh);
- my $outputfile = '/tmp/output.txt';
- my $junkuserfile = '/tmp/junkuser.txt';
- my $junkauthfile = '/tmp/junkauth.txt';
- my %outputfiles = (
- output => $outputfile,
- junkuser => $junkuserfile,
- junkauth => $junkauthfile
- );
- my %outputfh;
- foreach(keys(%outputfiles)) {
- open(my $fh, '>', $outputfiles{$_})
- or die ("Couldn't open out file $outputfiles{$_}: $!\n");
- print $fh "My header row\n";
- $outputfh{$_} = $fh;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement