Re: sorting anonymous arrays inside arrays

2009-07-02 Thread Jim Gibson
On 7/2/09 Thu Jul 2, 2009 12:12 PM, "daem0n...@yahoo.com" scribbled: > > Hi, > > If I have a loop that for each run creates > > while (){ >   my $value =~ /^\d/; >   $myhash{$mykey}->{'subkey'} = $value; > } > > > Normally, if I only want to sort $myhash through it's values, I would do > s

sorting anonymous arrays inside arrays

2009-07-02 Thread daem0nb0y
Hi, If I have a loop that for each run creates while (){   my $value =~ /^\d/;   $myhash{$mykey}->{'subkey'} = $value; } Normally, if I only want to sort $myhash through it's values, I would do something like: foreach (sort { $a <=> $b } keys %myhash){ print "$myhash{$_}\n"; } what if i

Re: Arrays inside

2002-09-06 Thread Jeff 'japhy' Pinyan
On Sep 6, Tobin, Elliot said: >sub setFields > { >my ($inBlock, @fieldList) = @_; > >foreach my $i (@fieldList) >{ > push($inBlock->{'fields'}, $i); You'd need to say push @{ $inBlock->{fields} }, $i; >} > >return $inBlock; > } But given your current function, it's

Re: Arrays inside

2002-09-06 Thread James Edward Gray II
On Friday, September 6, 2002, at 08:54 AM, Tobin, Elliot wrote: > I have the following as my data inside a package: > > my $dataBlock = { isInsertable=> $isInsertable, > fields => undef, fields

RE: Arrays inside

2002-09-06 Thread Nikola Janceski
see inline comments: > -Original Message- > From: Tobin, Elliot [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 06, 2002 9:55 AM > To: '[EMAIL PROTECTED]' > Subject: Arrays inside > > > I have the following as my data inside a package: >

RE: Arrays inside

2002-09-06 Thread Bob Showalter
> -Original Message- > From: Tobin, Elliot [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 06, 2002 9:55 AM > To: '[EMAIL PROTECTED]' > Subject: Arrays inside > > > I have the following as my data inside a package: >

Arrays inside

2002-09-06 Thread Tobin, Elliot
I have the following as my data inside a package: my $dataBlock = { isInsertable=> $isInsertable, fields => undef, requiredFields => undef, selectionFields =