user-pic

Gnustavo

  • Commented on Tie::File don't while(<>)
    I think "sort @file" should be simply "sort", right? Moreover, if you're useing strict that %seen hash must have been declared above. I usually prefer to use List::MoreUtils::uniq method instead because it seems simpler and more intuitive. I've never used...
  • Commented on Ditching A Language
    Joel Spolsky also argued against big rewrites: http://www.joelonsoftware.com/articles/fog0000000069.html...
Subscribe to feed Recent Actions from Gnustavo

  • Cosimo Streppone commented on Ditching A Language

    Bjørn you are now officially one of my heroes :-)

  • Steven Haryanto commented on Tie::File don't while(<>)

    One of the advantages of Tie::File is that you don't have to slurp all the file contents into memory. You can just push() or do a while ($item = each(@ary)), for example to work item by item.

    On the other hand, it's slow compared to low-level routines like open/read/>.

    The each(ARRAY) is Perl 5.12+ only.

  • Jesse Shy commented on Tie::File don't while(<>)

    @Gnustavo What? Not use strict and warnings, are you crazy? Yes, there are a couple of setup lines like that that I did not show. And you are correct on the sort, I changed this a little to protect the innocent and did not copy it correctly. @Steven, where I am using this, slurping the file could cause out of memory issues in some cases.

Subscribe to feed Responses to Comments from Gnustavo

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.