To search inside a file, I believe you must open that file.
Try this :-
#!/usr/bin/perl -w
open (FILE, "yourfile.any_ext");
@getdata = ;
print "content-type: text/plain\n\n";
if (grep /yourmatch/, @getdata) {
print @getdata;
} else {
print "Sorry ! couldn\'t find your match in the
On Thu, 8 Nov 2001, Rajeev Nalluri wrote:
> Is there any grep commandto search inside a file? perldoc grep gives a grep
> command on a string, not files.
>
> And also I cannot use either backticks or system to use unix grep command.
> I want to know is there any perl function to handle grep in a