hi people

I'm trying to get the value of $1 into a var, the following don't work
and I can't figure out why

    $_ = $html_body;
    my ($resrow) = m#<!-- VM: resrow -->(.*?)<!-- VM: /resrow -->#;
    #print $1;
    print $resrow;

$resrow holds nothing, however if I print $1 I do have a match

    $_ = $html_body;
    m#<!-- VM: resrow -->(.*?)<!-- VM: /resrow -->#;
    my $resrow = $1;
    print $resrow;

doesn't work either.

How do I get $1 into a var for later use. It's driving me a little loopy
now.

I'm basically trying to extract the middle bit into a var of it's own. I
thought that would be easy.... 

Cheers

Angie



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to