You'll need to be more specific. There is no explicit memory allocation in perl (well, actually, you can treat a string as a chunk of memory). What exactly do you want to know?
Randy.
I want to whether we have some sort of allocation method as we have in C where we have memory allocated from heap, stack for different types of memory allocations.
In perl there are only two basic ways to allocate variables. The package variable which would be roughly analogous to C's static variables and the 'my' variable which is allocated "on the stack" like auto variables in C. That's it as far as perl is concerned. As I alluded to in my previous post, you can treat a string like a chunk of memory:
my $mem = ' ' x 1024;
gives you a 1 kb chunk of "memory". You can then "store" and "retrieve" variables by using pack and unpack. It's rare that you would want to do this, however; the only thing that occurs off-hand is reading in a file that contains data encoded in a binary format.
> As far as my knowledge in perl is concerned it > runs C code internally. I am not getting how do a variable gets stored > with perl.
Perl doesn't run C code internally. It is implemented in C. The perl code is never translated to C.
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>