Flemming Greve Skovengaard wrote:
Brian Volk wrote:

Hi All,
I'm having trouble narrow down the correct "<img" tag...
This piece of code will get ALL the "<img" tags: while (my $img_tag = $parser->get_tag('img')) {
my $i = $img_tag->[1]; my $code = $i->{'src'}; print "$code\n"
} All I want is the 11th one... so I tried to do a foreach (1..11) , very
unsucessful... :~)

How about for(0..10) since the 11th element in an array will be 10 not 11 :)

--
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