in reply to opening consecutive files
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: opening consecutive files
by harry34 (Sexton) on Jun 27, 2003 at 13:26 UTC | |
by Abigail-II (Bishop) on Jun 27, 2003 at 13:29 UTC |