How about this case sensitive solution
===================
#!perl -w
use strict;
my ($file_name, $search_string) = @ARGV;
open(INFILE, "< $file_name") or die "Couldn't open $file_name for reading:
$!\n";
while (<INFILE>) {
if ($_ =~ m/\Q$search_string\E/) {
print "yes";
exit();
}
}
print "no";
"Matt O'Neill" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi guys,
>
> I need a very simple command line perl program that takes two arguements,
> the frist being a filename and the second being a word to be searched for
in
> that file. Then I simply want the result to print "yes" if arg2 is found,
> or "no" if it is not.
>
> Thanks for your help
>
> matt.
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]