Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Push in for loop doing nothing?

by jluckhurst (Initiate)
on Mar 25, 2012 at 07:14 UTC ( [id://961463]=perlquestion: print w/replies, xml ) Need Help??

jluckhurst has asked for the wisdom of the Perl Monks concerning the following question:

I just started learning Perl less than a week ago... so please bear with me. I'm trying to find a certain key word within a sea of HTML...

while (<FILEHANDLE>) { my $HTML = &GetHTML($_); while ($HTML =~ /<tag>(.*)<\/tag>/) { our @Results; push (@Results, $1) while />(.*)</g; shift @Results; # I don't want the first result. print @Results; } }

And the print statement yields nothing. I still have some work to do on the results... Is this a scope issue?

EDIT: Never mind... It was a programmer error.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://961463]
Approved by moritz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-24 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found