in reply to Re: matching regex on an array element w/o looping the array
in thread matching regex on an array element w/o looping the array
#!/usr/local/bin/perl -w use strict; use File::Find; use Data::Dumper; my $file = "/u90/gvc_archive/ama_recover/chad.lst"; my $startDir = "u90/gvc_archive/ama_recover"; my $destDir = "$startDir/4tych"; my @toget; my %sourcefiles; my @foundfiles; chdir $startDir; open(FILES,"<$file"); find(\&pushsources,"."); for (<FILES>){ s/ *$//; chomp; print "Checking $_\n"; my $file = $sourcefiles{"$_"}; print "\t $file \n" if ($file); } sub pushsources { s/\.gz$//; chomp; $sourcefiles{$_}=$File::Find::name ; }
|
|---|