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


in reply to Re^2: WWW::Mechanize::TreeBuilder and WWW::Mechanize. Following links but can't return without error
in thread WWW::Mechanize::TreeBuilder and WWW::Mechanize. Following links but can't return without error

Whoa, well that is the trouble with trees and trying to save memory :) you can work around it like this

@list = map { $_->clone } @list;
or
my @list = map { $_->clone } $mech->look_down(_tag => "a", class => "l +inks" );