for (my $c = 1;; $c ++) { my $file = "graph_set_$c.out"; last unless -f $file; open my $fh => "<", $file or die "Failed to open $file: $!"; ... # Do something with $fh. }
Abigail
In reply to Re: opening consecutive files
by Abigail-II
in thread opening consecutive files
by harry34
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |