in reply to Re: simple search problem (but not for me!!)
in thread simple search problem (but not for me!!)
So what am I doing wrong now?!!#!/usr/bin/perl -w use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use CGI ':standard'; $prepage = "/path/to/page"; print "Content-type: text/html\n\n"; #open file: open (PAGE, "$prepage") || die "Couldn't get prepage ched"; @prep=<PAGE>; while( my $line = <PAGE> ) { if( $line =~ /<!--a -->/ ) { # could do index(), if looking for exact match like this suba(); last; } elsif( $line =~ /<!--b -->/ ) { # ditto subb(); last; } } close (PAGE); sub suba{ print "suba says hi!"; } sub subb{ print "subb says hi!"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: simple search problem (but not for me!!)
by BrowserUk (Patriarch) on Oct 12, 2002 at 23:09 UTC |