>>>>> "RD" == Rob Dixon <rob.di...@gmx.com> writes:

  RD> Thanks Uri. It's midnight and I should be in bed :-/

we should all be in bed!

  RD> Version 2:

  RD>   sub file_contains {
  RD>     my ($file, $string) = @_;
  RD>     open my $fh, '<', $file or die $!;
  RD>     my %names = map { chomp; ($_ => 1) } <$fh>;
  RD>     return $names{$string};
  RD>   }

did you see my fast slurp version in this thread?

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
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