Taylor, Andrew (ASPIRE) <[email protected]> wrote:
> I'm processing a file of test data that looks something like:
>
> FH1,data1,data2,data3,...etc
> FH2,data1,data2,data3,...etc
> FH1,data1,data2,data3,...etc
>
> Each line split into an array and processed.
>
> The first element (FH1, FH2, etc) is the name of the filehandle the
> output should be printed to.
[...]
Try
my %fh;
open( $fh{'FH1'}, '>', $somefile ) or die "Can't open $somefile: $!";
...
print $fh{'FH1'} "$output\n";
HTH,
Thomas
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/