Re: Storing an array in a hash

2006-06-22 Thread Mr. Shawn H. Corey
On Thu, 2006-22-06 at 01:47 +, Jeff Peng wrote: > > > This conversion to and fro must be inefficient and time consuming. Is > > > there a "better" way to do this? > > > >Use an anonymous array: > > > > $array{$client} = [ @field ]; > > > > @field = @{ $array{$client} }; > > > > > > Or use

Re: Storing an array in a hash

2006-06-21 Thread Jeff Peng
> This conversion to and fro must be inefficient and time consuming. Is > there a "better" way to do this? Use an anonymous array: $array{$client} = [ @field ]; @field = @{ $array{$client} }; Or use the array's reference as the hash's values: $array{$client} = [EMAIL PROTECTED];

Re: Storing an array in a hash

2006-06-21 Thread Mr. Shawn H. Corey
On Wed, 2006-21-06 at 11:22 -0600, Don Sutter wrote: > Hi, > > I'm storing an array in a hash as a string using: > > $array{$client} = "@field"; > > and retrieving the array so I can manipulate it with: > > @field = &shellwords($array{$cli

Storing an array in a hash

2006-06-21 Thread Don Sutter
Hi, I'm storing an array in a hash as a string using: $array{$client} = "@field"; and retrieving the array so I can manipulate it with: @field = &shellwords($array{$client}); This conversion to and fro must be inefficient and time consuming. Is there a "bette