Skip to main content



I thought I had seen somethink about this, but does Perl reserve a block of memory upon startup for user variables? Or are user variables always allocated when they are created/initialized with Newx, Newxz ?
From some benchmarks it seems that Perl does set some memory aside to avoid requesting memory from the OS all the time, and I thought I had seen some material about how to modify this "scratch space" but I could be very wrong or senile.

submitted by /u/ReplacementSlight413
[link] [comments]



I have noticed the Perl Cookbook, 2nd Edition as an outstanding reference. How about the work Perl by Example, Fifth Edition? How does it compare? Would you recommend it as a reference as well?

submitted by /u/fosres
[link] [comments]



Hi Everyone.

I am learning from the book "Learning Perl" and so far the journey is thankfully going great!

One thing noticed about Perl is that although the developer community here is smaller than other mainstream languages it feels very tight-knit. Is that just me or were you also drawn to Perl because of the strong community responsiveness to each other?

submitted by /u/fosres
[link] [comments]



submitted by /u/niceperl
[link] [comments]


UUID::Tiny has a weird way of getting a random 32bit integer using 2x random 16 bit integers bitwise OR'd together:

sub _rand_32bit { _init_globals(); my $v1 = int(rand(65536)) % 65536; my $v2 = int(rand(65536)) % 65536; return ($v1 << 16) | $v2; }

Anyone know why you would do this instead of just: my $rand = int(rand(2**32));? Also why the modulus, isn't it redundant?

submitted by /u/scottchiefbaker
[link] [comments]