http://www.perlmonks.org?node_id=1031453


in reply to Re^2: how to extract iframes from text
in thread how to extract iframes from text

The output you are showing looks like it was produced by Data::Dumper, yet the line print STDERR (Mojo::DOM->new($args->{$t})->at('iframe')); doesn't contain any references to Data::Dumper.

Could it be that you are confused, and the output is produced by some other code?

Replies are listed 'Best First'.
Re^4: how to extract iframes from text
by Anonymous Monk on Apr 30, 2013 at 19:06 UTC
    You are right. that was the dumper(line before). Is there a way to put it in an array?
Re^4: how to extract iframes from text
by Anonymous Monk on Apr 30, 2013 at 19:45 UTC
    You are right. that was the dumper(line before). But it is printing just the first iframe not the others. Is there a way to put them all in an array?
      The at function only finds the first element matching. So it should only return 1.

      To be able to print all iframes, According to Mojo::Dom documentation  findis what I were after, as it returns a collection that matches.

      Now I am trying to find a way to put them in an array....