> OK I get it now. I have made a few changes to your original,
> particular because I don't liek to use @ARGV with in a
> script. I also changes the way you store file, moving it into
> a hash structure so comparisons are much faster. Feel free to
> modifie as is.
>
> HTH,
> Mark G.
>
> #!PERL
>
> use warnings;
> use strict;
>
> open RD,"te.txt" or die "ERROR: $!\n";
> opendir RD_DIR, "." or die "ERROR: $!\n";;
>
> my @TMP = readdir RD_DIR or die "ERROR: $!\n";
> my %DIR_LIST;
>
> $DIR_LIST{$_}=1 for @TMP;
>
>
> foreach my $file ( <RD> ){
> chomp $file;
>
> unless( $DIR_LIST{$file} ){print STDERR "$file: NOFILE\n";next;}
>
> # do stuff here if matched
>}
Mark, thank you! I really need to work on understanding hashes, so this
will be a great start.
Thanks again!
Brian
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>