[tpm] YARE (yet another regex) question

Fulko Hew fulko.hew at gmail.com
Fri Aug 1 09:12:52 PDT 2008

On Fri, Aug 1, 2008 at 10:50 AM, Madison Kelly <linux at alteeve.com> wrote:

>  As an expansion to my earlier question on assigning values to new
> variables directly from a regular expression; I want to now use a similar
> technique to populate a 'foreach' loop.

... snip ...

> However, this doesn't:
> my $results_page=$agent->content;
> my %results=();
> foreach (my $variable, my $value) ($results_page=~/<input name="(.*?)"
> type="hidden" value="(.*?)">/gs)

How about... you forgot the equal sign for the assignment!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/toronto-pm/attachments/20080801/c6708e53/attachment.html>

More information about the toronto-pm mailing list