in reply to Memory Management...

As everyone has already mentioned, Perl has garbage collection and you don't need to worry about it. However, if you did for some reason need to free up some memory the way to do that would be
undef $x;
not
$x = undef;
The former is equivalent to the C "free" function, whereas with the latter you are moving your pointer/reference off your object - if this were C code, you'd have just lost your allocated memory and leaked it. This is Perl, so the garbage collector takes care of you and it works, but not for the reason you think it does.

There is one case where you need to manage your memory in Perl, and that's when you're using SWIG to allocate memory in C from Perl:
use SwiggedCLib; #allocate a struct in C my $pointer = SwiggedCLib::createIt(); #do something with the struct my $result = SwiggedCLib::doSomething( $pointer ); #destroy the struct - Perl doesn't know how SwiggedCLib::destroyIt( $pointer );
When I did this with SWIG/C/Perl/Tcl, I vaguely remember having to undef the $pointer that held the struct or I would get a fatal exception from the garbage collector. However, that may have been in Tcl, not Perl. And I may have been doing something wrong. I'll update this when I get home and can look at the code...

Update

I just checked the code, and I did need to do
undef $pointer;
after freeing the memory using a SWIGged C function (which also set the C pointer to NULL). The error I got if I didn't may have been a segfault - I don't remember, I just know it was a showstopper. It leaves open the possibility that I was doing something wrong - it worked fine in Tcl, though...