Harry Putnam wrote:
>   find(
>     sub {
>       ## if we have a directory name that matches
>       if($File::Find::dir =~ /$dir_rgx/){
>         ## if that directory has files with all numeric names
>         if(/^\d+$/){

  if( ! /\D/ ){

>           ## Open the files and search for a regex in the text
>           open($fh,"< $File::Find::name")
>                 or die "Can't open $File::Find::name: $!";

  open my $fh, '<', $File::Find::name
    or die "could not open $File::Find::name: $!\n";

>           while(<$fd>){

  while( <$fh> ){

>             if(/$text_rgx/){
>               print, $_;

  print;

>             }
>         close($fh);
>         }
>       }
>     }

    },
    @directory_list

>   )


-- 
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your
thingy.

Eliminate software piracy:  use only FLOSS.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to