in reply to Problem with File Handler
If you want to use an array to hold your file handles you can do it this way.
my @filez; open $filez[ $_ ], ">data/file$_.dat" or die $! for 0..2; for my $i ( 0..2 ) { print { $filez[ $i ] } 'somedata'; #required ^..............^ } close $filez[ $_ ] for 0..2;
|
|---|