in reply to simple search problem (but not for me!!)
So basically, when you encounter a special comment tag in your html file, you jump to a subroutine, eh? Sounds kinda bizarre, but anyway...
sub foo { # ....initialization stuff...., blah blah while( my $line = <SOURCE> ) { if( $line =~ /<!--a -->/ ) { # could do index(), if looking f +or exact match like this sub_a(); last; } elsif( $line =~ /<!--b -->/ ) { # ditto sub_b(); last; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: simple search problem (but not for me!!)
by jonnyfolk (Vicar) on Oct 12, 2002 at 22:46 UTC | |
by BrowserUk (Patriarch) on Oct 12, 2002 at 23:09 UTC |