in reply to Re: So Simple, Yet no tutorial covers it
in thread So Simple, Yet no tutorial covers it

Change your if conditional line with the regex to this:
if ($content =~ /$start\s*(.*?)\s*$end/) {
you really don't have to have the word boundaries, and you should always expect possible white space.

Remember, TIMTOWTDI

Jeff

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
F--F--F--F--F--F--F--F--
(the triplet paradiddle)

Replies are listed 'Best First'.
Re: Re: Re: So Simple, Yet no tutorial covers it
by ichimunki (Priest) on Jan 22, 2001 at 07:50 UTC
    And take out .*? You probably want .+? Since this will grab at least one character for sure. Also, adding an else clause after the if would be a good way to notify the user if there is not match, or to provide a default location, like 'no location given'.