------------------------------------------------ On Wed, 12 Feb 2003 10:45:20 +0530, "Roopa.Mahishi" <[EMAIL PROTECTED]> wrote:
> > > Hello friends, > I would like to find the size of the data type /struct in Perl. Is there any > command/keyword available in Perl which i can use in my scripts? > Any help is this regard would be really useful to me. > Are you referring to the size of a particular type of variable, or are you talking about the internal memory size? In the former case, perldoc -f length for finding the length of strings or for lists, if you use them in a scalar context will give you the number of elements, for instance: $size = scalar(@array); $size = scalar(keys(%hash)); In the latter case you may want to have a look at: perldoc perlrun In particular the section on "PERL_DEBUG_MSTATS" .... Or you may want to have a look at Devel::Size from CPAN: http://search.cpan.org/author/DSUGAL/Devel-Size-0.54/Size.pm http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]