in reply to Re^2: searching for multiple strings in a line
in thread searching for multiple strings in a line
#!/usr/bin/perl use warnings; use strict; #This is where we read in the arguments from the command line my $file_name = shift; my $String = shift; #This is where we read in the file and output to the file open(INFILE, $file_name) or die "Can't open file\n"; #while reading from the file... while (<INFILE>) { $_ = uc(); my @things = split(/$String/); if ($#things > 0) { print "There is a nested SQL in this file\n"; exit; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: searching for multiple strings in a line
by dhudnall (Novice) on Jul 10, 2007 at 17:58 UTC |