in reply to Binding operator RAM eater

Not related to your problem but I'm wondering why you do

foreach (@links) { my $link = $_; ...

when you could simply write

foreach my $link (@links) { ...

The $link scalar in the second snippet still only exists within the scope of the foreach.

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^2: Binding operator RAM eater
by GrandFather (Saint) on Apr 17, 2012 at 22:51 UTC

    It's not an issue with the OP's code, but in some cases you may wish to work with a copy instead of an alias (as you would get for the foreach my $link (@links) variant) so that you can edit the variable without altering the contents of the aliased array element.

    True laziness is hard work