From the viewpoint of language definition of Perl, there is nothing which dictates that memory must be reused, though an implementation of Perl, which does not free memory, would hardly be useful except for the most simple tasks. So I would say: The question whether "Perl" (as a language) reuses memory, is meaningless, but all existing Perl implementations certainly re-use memory. Of course this does not mean that part of the memory not used by Perl, automatically can be used by other application. This question belongs to the architecture of the undrelying OS, and is not related to Perl.
can't I free a memory and assign to some other ?
Yes and no. You can not force Perl to re-use memory in a way you dictate (and I don't see a reason why you would want to anyway), but memory is re-used automatically, on the fly. For instance, in the following program
my $a='abcd';
...
$a='efgh';
the space occupied by the string 'abcd' is not lost, but will eventually be used later on for something different.
--
Ronald Fischer <ynnor@mm.st>