SPUG: hashes, arrays, map, join
ced at carios2.ca.boeing.com
ced at carios2.ca.boeing.com
Fri Mar 9 21:17:58 CST 2001
> Not sure of whether not it's the fastest way to go but:
> join (',', map {"$_:$ids{$_}"} keys %ids);
> should work.
Can't resist the pull of speed :)
my $r = join "," => %ids;
You can just use the hash in list context for re-assembly.
This is faster than anything I've found yet.
Rgds,
--
Charles DeRykus
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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