in reply to next unless - and then 'until'
this will scan the directory. once it finishes reading itll close the file handle for a new one or the same or whatever. You need to be more specific but this might be the goto you were looking for#!/usr/bin/perl -w $tag= "al"; opendir (DIR_B, ".."); $c= 0; {TEMP: while(my $job_B=readdir(DIR_B)){ print "D $c\n"; next unless $job_B =~ /Out_$tag\.txt$/; } } print "DONE\n"; close (DIR_B);opendir (DIR_B, ".."); goto ("TEMP");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |