Hi All:
If I have files like the following:
checking: env-20010712-0
checking: env-20010712-1
checking: env-20010712-10
checking: env-20010712-11
checking: env-20010712-12
checking: env-20010712-13
checking: env-20010712-14
checking: env-20010712-15
checking: env-20010712-16
checking: env-20010
am a real newbie to perl
I have a friend who wrote this program which outputs the scores of my
friends
the code works and outputs the correct scores and arrangement of the scores
but im having this error on my http/error_log,
this is the error:
[Thu Mar 23 16:43:28 2006] [error] [client 203
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
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:
>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
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:
>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
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/;
>>
>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,
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
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
11 matches
Mail list logo