Well, I guess I had that in me from years spent coding C/C++, but
alwasy pass references to data instead of replicating it. Undoubtfully this is a rather trivial skill to grasp and anyone who'd spent at least 6 month coding would *I hope* know that.
Perl is actually quite good when it comes to references. Certainly much easier to handle than C pointers for example. Take a look at this snippet:
my ($a, $b, $c) = qw/asdf foo bar/;
s/d/D/g for ($a, $b, $c);
print "$a;$b;$c\n";
Perl is farily well optimized and in this
for loop no memory gets duplicated. Instead, the
s/// operator works on data stored in the original place (allocated for the a,b,c variables).
There are numerous other examples one could bring up. Not the least is the ease with which you can pass references around in perl. In fact, I believe this is one of the first basic things that any novice Perl book would mention to its reader. For those who don't have a book however, I suggest refering to this excellent 'article' on Perl references
here (written by fair brother
dominus.
_____________________
# Under Construction