Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have a for loop which right now prints results to the screen liek:
Now I want to make this a generic thing, a module accessible to other scripts I write. What data structure is best to use, how can I return this to the calling scripts? What in perldoc do I need to read and understand?
for my $result ( $mech->links() ){ print "title: $result->name\n"; print "text: $result->text\n"; }
Now I want to make this a generic thing, a module accessible to other scripts I write. What data structure is best to use, how can I return this to the calling scripts? What in perldoc do I need to read and understand?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: From single script to code reuse
by haukex (Archbishop) on Jul 11, 2017 at 09:40 UTC | |
Re: From single script to code reuse
by Discipulus (Canon) on Jul 11, 2017 at 11:26 UTC |
Back to
Seekers of Perl Wisdom