I was able to find match extraction in the perldoc.

Here is a snippet of what I have.

my $insult = ( $mech->text =~ m/Insulter\ (.*)\ Taken/ );
print "$insult\n";

But $insult is being populated with: 1

It should be populated with text. Can anyone tell me what I'm doing wrong here?

Thanks.

On 1/18/15 11:49 AM, Mike wrote:
Hey everyone, I'm trying to find information on how I can use regular expressions to populate a variable.

I want to pull text between one set of characters and another set of characters and use that to populate my variable. Can anyone point me in the right direction?

Thanks.


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to