Deleting entry: pedro/2010/10/29/0

Password:

Please confirm the deletion of this entry.


[Trackback URL for this entry] ah, time for my yearly smattering of blog posts:

Annnnnnnnnnd we're back.

Today's hot tip:

@filearray = <FILE>;

...is a bad idea if <FILE> is rilly large!

Thank you good night.

(No Perl jokes, please.)

Update:

Also, don't do:

foreach (<FILE>)

... it's basically just as bad.

Instead, you are WAY better off doing:

while ($line = <FILE>)

... which only reads one line at a time. You get the same functionality at a fraction of the memory usage.

Filed under:



[Main]

Unless otherwise noted, all content licensed by Peter A. H. Peterson
under a Creative Commons License.