in reply to using perl variable in muliple modules

Object methods are just like normal functions; they can use return to return a value. For instance, lets take a look at exportLinks:

sub exportLinks { my ($self, $i) = @_; my @my_links = { ... }; # do your thang here return @my_links; }

That will return @my_links back to your main code, and assign to @links its value.

On unrelated notes, the type of functionality you want can be found in HTML::Parser and HTML::LinkExtor. Also, use strict and -w. :)