-
Exponential Growth is Fast
2005-04-27 22:05 in /tech/perl/HallOfShame
The following is a good way to use up all your memory amazingly quickly:
my $special_chars = "!@#$%^&"; ... sub munge { ... $special_chars = quotemeta($special_chars) ... }[Aside: I’ve come to realize that a risk in this “Hall of Shame” business is that coworkers might take offense. So, let me make a comment or two. First off, a healthy fraction of these examples are actually things that I wrote at one point, so I do try to be fair. Second, my intent really is to teach, and maybe amuse occasionally, not to ridicule; I hope that someone, somewhere will avoid stepping into the same trap.]
Leave a comment
Please use plain text only. No HTML tags are allowed.
Comments are closed for this story.
Trackbacks are closed for this story.