error in http://faq.perl.org/perlfaq4.html#How_do_I_find_the_fi

[email protected] (hg6423) Tue, 26 Apr 2005 02:33:53 +0200
Newsgroups perl.perlfaq.workers
Message-ID <[email protected]>
Hi.

I think in

     http://faq.perl.org/perlfaq4.html#How_do_I_find_the_fi

the code

     my $found;
     foreach my $element ( @array )
     {
         if( /Perl/ ) { $found = $element; last }
     }

should read either

     my $found;
     foreach my $element ( @array )
     {
         if( $element =~ /Perl/ ) { $found = $element; last }
     }

xor

     my $found;
     foreach ( @array )
     {
         if( /Perl/ ) { $found = $_; last }
     }


Greetings,
Peter Schweizer