As for the Perl flavour i can strongly suggest Strawberry Perl? You'll get a perl installation with a lot other useful packages preintalled and cpan and cpanp client working out of the box having a C compiler bundled.
As far as i know, concerning free memory, you can release memory to the pool used by that Perl process, no to the operating system.
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.