use strict; use warnings; use IO::File; foreach my $i (1 .. 30) { my $fh = IO::File->new("graph_set_$i.out") || die "Cannot open $i'th file\n"; # Use $fh here $fh->close; }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In reply to Re: opening consecutive files
by dragonchild
in thread opening consecutive files
by harry34
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |