SPUG: hashes, arrays, map, join

Andrew Sweger andy at n2h2.com
Fri Mar 9 19:38:19 CST 2001


%ids = $results =~ /(?:^|,)(\d+):(\d+)(?=,|$)/g;

is more evil. :)

On Mar 9, 2001 @ 5:31pm, Alex Leites wrote:

> One more thing:
> 
> %ids = split /[,:]/, $results;
> 
> is probably more efficient.

-- 
 Andrew B. Sweger <andy at n2h2.com> |  N2H2, Incorporated
 Manager, ICE Development Dept    |  900 Fourth Avenue, Suite 3400
 Content Management Division      |  Seattle WA 98164-1059
 v=206.336.2947  f=206.493.0906   |  http://www.n2h2.com/


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/





More information about the spug-list mailing list