Phoenix.pm: New meeting place

Shay Harding mekla at geocities.com
Thu Sep 2 01:10:05 CDT 1999


I'm game for a meeting. Been a while, but the new place is near my work
anyway. When and what will we be doing?

As far as ideas... not sure. Did the web site thing I was hearing about
ever take off? I thought I remembered someone mentioning having something
online where people can submit snippets of useful code, and that sort of
thing.

I saw a snippet of code I thought was useful so I'll post:

@sorted_by_size = 
  map { $_->[0] } 
  sort { $a->[1] <=> $b->[1] } 
  map { [$_, -s] } 
  @files;

This basically sorts a bunch of files by size but can be adapted to sort
whatever you want. It is much more efficient than:

@sorted_by_size = sort { -s $a <=> -s $b } @files;


For a full explanation of the above go to:

http://www.5sigma.com/perl/schwtr.html



Shay




More information about the Phoenix-pm mailing list