CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [Laurent_R] Sorting data: Edit Log



Akotb
Novice

Sep 7, 2016, 2:12 AM


Views: 11492
Re: [Laurent_R] Sorting data


In Reply To
Please see my previous post, which you may have missed because it was posted exactly at the same time as yours, and see if it helps you doing what you want.


But the program uses a hash array as input. When I put in your program code, it is not executed.

Here's a clipping from my program, which is the formation of a hash array:

Code
unless (exists($rezults{$1})) { 
$rezults{$1} = []; # If earlier the pilot did not meet - create a reference to an empty array if the value of the cache pilots with key $ 1
}
push @{$rezults{$1}}, $2; # add the result to the end of the array


So i use your code and put it to:


Code
# function display the results in a particular pilot   
sub showResult {
my ($names, $rez, $name) = @_;
my $previousTime = 0; # previous lap time
my $ring = 1; # lap number
#print $out "results of the pilot $names->{$name}\n\n"; #remove this line. We do not need the results of a particular pilot, we need a summary of all at once
print $out " lap\name\current time\lap time\n"; #add the name of the pilot here


I have tried to implement this part of the code under my sort, but I see that there are many errors. File is first displayed, and then made his sorting. I find it difficult to immediately understand how to fix.


(This post was edited by Akotb on Sep 12, 2016, 12:19 PM)


Edit Log:
Post edited by Akotb (Novice) on Sep 12, 2016, 12:19 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives