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;
In reply to Re: Problem with File Handler
by BrowserUk
in thread Problem with File Handler
by kokarikomi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |