thanks
this solved my problem
my @output_sorted = sort { (split /,/, $b)[0] <=> (split /,/, $a)[0] }
@output;
thanks to all that helped
Jeff Pang <[EMAIL PROTECTED]> writes:
>
>>this is my friend's script
>>
>># collect all score
>> my @output = ();
>> my @old_output = ();
>> for
This is not exactly an answer to your question, but hopefully it will be
helpful.
Whenever I have what is for me a non-trivial problem in an application, I
write a script that deals only with what seems to be the error in the
application script. I then fiddle with the former until I solve the
>this is my friend's script
>
># collect all score
> my @output = ();
> my @old_output = ();
> foreach my $list (@bugkillers) {
>my ($id,$name) = split(/,/, $list);
>my $score =
>$Bugs->getSCORE($showold,$id,$contest,$pContest,$groups);
>push(@output,"$score,
Yep-- That did it.
THANK YOU!
gS
On Wednesday, July 18, 2001, at 09:35 PM, Jeff 'japhy/Marillion' Pinyan
wrote:
> On Jul 18, Groove Salad said:
>
>> sub normalize
>> {
>> my $file = shift;
>> my $s = sprintf("%02d",$1);
>> $file =~ s/^env-//;
>> $file =~ s/-(\d+)/$s/;
>>
On Jul 18, Groove Salad said:
>sub normalize
>{
> my $file = shift;
> my $s = sprintf("%02d",$1);
> $file =~ s/^env-//;
> $file =~ s/-(\d+)/$s/;
> return $file;
>}
The $1 variable is related to the (\d+) in the regex. You can't use it as
you have, since the regex hasn't happ
Hi:
I made the change and the env-mmdd-0 file is indeed the first in the loop. Now they are not incrementing:
The next file should be env-mmdd-1 env-mmdd-2 etc, but instead I'm getting this:
checking: env-20010712-0 for message, GDPN9D00.SRY
checking: env-20010712-0 for message, GDPN
On Jul 18, Groove Salad said:
>Thanks for the quick response. I think what you've described is a bit
>over my head. But, I'll try it and see what happens.
>
>The files will always be, env-mmdd-nn and will get rotated at months
>end. However, your solution much more flexible.
Since they'll
Thanks for the quick response. I think what you've described is a bit
over my head. But, I'll try it and see what happens.
The files will always be, env-mmdd-nn and will get rotated at months
end. However, your solution much more flexible.
Thanks again,
gS
On Wednesday, July 18, 2001,
On Jul 18, Groove Salad said:
>checking: env-20010712-0
>checking: env-20010712-1
>checking: env-20010712-10
>checking: env-20010712-11
>checking: env-20010712-12
[snip]
>checking: env-20010712-7
>checking: env-20010712-8
>checking: env-20010712-9
>
>How can I get them in numerical order? I tried