This little script is one of my first attempts with perl, it works ok but I would also like to capture the output to file. Help appreciated. Would also appreciate constructive criticism of the script itself.(oh,oh!)
The script basically takes a named file, and searches the file for a specified string. ################### #!/usr/bin/perl -w print "File to search ?\n"; $logfile = <STDIN>; chomp $logfile; print "Search for what ?\n"; $string = <STDIN>; chomp $string; open(LOG,"$logfile") or die "Unable to open $logfile:$!\n"; while(<LOG>){ print if /\b$string\b/i; } close(LOG); #################### cheers jimf -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]