RE: Re: sort by value - FIXED

2001-06-26 Thread mark . bedish
: redsquirreldesign [SMTP:[EMAIL PROTECTED]] Sent: 26 June 2001 14:50 To: Bedish, Mark; beginners Cc: redsquirreldesign Subject: Re: sort by value? Mark Bedish wrote: > Dave, > > >It looks to me that your hash %ch is empty. Your > >foreach will never begin because there is no list > to >

Re: sort by value?

2001-06-26 Thread Mark Bedish
Dave, >It looks to me that your hash %ch is empty. Your >foreach will never begin because there is no list to >iterate. You need to assign keys & values to %ch. >When it is time to sort numerically, use the spaceship >operator <=>. So it would look like this: >sort { $ch{1} <=> $ch{2} } No

sort by value?

2001-06-26 Thread Mark Bedish
@fields = qw/Text Time/; my %ch; foreach my $key (sort { $ch{1} cmp $ch{2} } keys %ch ) { print OUT "$key: $ch{$key} \n"; # show key and value } Thanks, Mark Bedish

Re: substring replacement

2001-06-21 Thread Mark Bedish
in for this type of processing, but VB is the standard so I have an uphill struggle :-( Thanks again, Regards Mark Bedish Surrey,UK

substring replacement

2001-06-20 Thread Mark Bedish
); print LOG "Unpacked format for array: \n"; for $i (0..64) { print LOG $testbad[$i]; } print LOG "\n"; for $i (0..64) { if ($testbad[$i] == 13) { $testbad[$i] = 40; } } __SNIP__ Many Thanks, Mark Bedish Surrey,UK