Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Wednesday November 24, 2004
03:48 PM

The invention of Perl arrays

[ #21991 ]

In case you want to re-implement Perl arrays, The Daily WTF shows you how.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Reinventing Perl Arrays? That's nothing. When I was a wee lad, we had to reinvent the bit every morning before breakfast, and reinvent symbol tables every night before supper. And if we were really lucky, we'd only get beaten five times instead of the usual twenty.

    Seriously though, a former colleague of mine had a better horror story. It went something like this:

    $index = "";
    $element_count = $#array + 1;
    open(TEMP, ">temp.file");
    for( $index = 0; $index < $element_count; $i++) {
        print

  • I reinvented hashes in Java. I didn't know that they already existed in the standard library, so wrote my own, which was hideously inefficient as it was just two parallel arrays of keys and values.