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");
In reply to Re: next unless - and then 'until'
by zer
in thread next unless - and then 'until'
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |