Dear List
I have written the following code .
use Data::Dumper;
%file = (14 = GGG,
11 = AAA,
101 = EEE,
1 = TTT);
print Dumper \%file;
@arr1 = sort { $file{$b} cmp $file{$a} } keys %file; #the oldest entry lies
at the top position
print Dumper
Anirban Adhikary wrote:
Dear List
Hello,
I have written the following code .
use Data::Dumper;
%file = (14 = GGG,
11 = AAA,
101 = EEE,
1 = TTT);
print Dumper \%file;
@arr1 = sort { $file{$b} cmp $file{$a} } keys %file; #the oldest entry lies
at
Dear List
I need to delete each element after every execution of the foreach loop and
I need to update sorted the @arr1 after every execution of the foreach
loop. I have tried a lot but not able to do this Pls
help...
Thanks Regards
Anirban Adhikary
On Mon, Feb 25, 2008
On 02/25/2008 04:32:42 AM, Anirban Adhikary wrote:
- Dear List
-
- I need to delete each element after every execution of the foreach
- loop and
- I need to update sorted the @arr1 after every execution of the
- foreach
- loop. I have tried a lot but not able to do this Pls
-
On Mon, Feb 25, 2008 at 4:32 AM, Anirban Adhikary
[EMAIL PROTECTED] wrote:
Dear List
I need to delete each element after every execution of the foreach loop and
I need to update sorted the @arr1 after every execution of the foreach
loop. I have tried a lot but not able to do this
Deborah Scott wrote:
I have a txt data file that has several fields. Two of the fields are start
time and end time (listed in epoch time).
I need to write a perl program that finds (and prints) events that occur
between midnight last night and midnight tonight.
First problem:
The date
I have a txt data file that has several fields. Two of the fields are start
time and end time (listed in epoch time).
I need to write a perl program that finds (and prints) events that occur
between midnight last night and midnight tonight.
First problem:
The date for midnight last night and
PROTECTED]
Subject: Help with end-time start-time sorting problem
I have a txt data file that has several fields. Two of the fields are start
time and end time (listed in epoch time).
I need to write a perl program that finds (and prints) events that occur
between midnight last night and midnight
Here's the txt file. Thanks!
-Original Message-
From: Wagner, David --- Senior Programmer Analyst --- WGO
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 2:32 PM
To: Scott, Deborah; [EMAIL PROTECTED]
Subject: RE: Help with end-time start-time sorting problem
What
So what have you treied so far? Although production efficiency may be aided by using
prefab cope, the learning process is not. you should probably focus attention to the
sections on the time function. You may also want to isolate elements of the localtime
return string to check for the
Yes, I think so. THANKS! This is a great fantastic group. Glad I found it.
Have got what you need yet?
Wags ;)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Scott, Deborah wrote:
I have a txt data file that has several fields. Two of the fields are
start time and end time (listed in epoch time).
I need to write a perl program that finds (and prints) events that
occur between midnight last night and midnight tonight.
First problem:
The date
Consider the following form submission data (partial data):
match date: September 29
map: Heutau
Match 1
USN - 341 (winner)
1st PD - 204
Match 2
GD - 404(winner)
RMPZ|SS - 136
Match 3
ITF - 292
RsR - 296(winner)
which is sent through a perl script and creates the
Hello,
I've got an array of arrays, and want to sort by the 3rd element of the
subarray. I then want to print out the sorted array, showing the index and
values. E.g.,
@AoA = (
[23.56, 65.2, 12.4],
[13, 56, 87],
[45,876, 23],
etc
)
And then the printout should
: Sorting problem
Hello,
I've got an array of arrays, and want to sort by the 3rd
element of the
subarray. I then want to print out the sorted array, showing
the index and
values. E.g.,
@AoA = (
[23.56, 65.2, 12.4],
[13, 56, 87],
[45,876, 23],
etc
-Original Message-
From: Richard Adams [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 10:18 AM
To: [EMAIL PROTECTED]
Subject: Sorting problem
Hello,
I've got an array of arrays, and want to sort by the 3rd
element of the
subarray. I then want to print out the sorted
on Mon, 06 May 2002 14:17:39 GMT, [EMAIL PROTECTED] (Richard
Adams) wrote:
[Please don't retype code - cut and paste instead]
I've tried
@sorted = {$a -[2] = $b -[2]} @AoA
You forgot the 'sort' function.
You put spaces before the '-'.
You got the sort order reversed.
Try
my
On Mon, May 06, 2002 at 03:17:39PM +0100, Richard Adams wrote:
Hello,
I've got an array of arrays, and want to sort by the 3rd element of the
subarray. I then want to print out the sorted array, showing the index and
values. E.g.,
Hmm, works for me with the exception of...
I've tried
Thanks for all your help...I just forgot the sort in my post...
The reason it wasn't working wasn't the sort, it was just that $AoA[0] was
undefined..
But sort {$a-[2] = $b-[2]} @AoA[1..$#AoA] works just fine.
Thanks again!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
Now I've got an array of hashes, where each hash can have different keys
e.g.,
@aoh = ( {H3 =234, H1 =127, DNA =1, p135 =167},
{H4=24, H3=1550, DNA =25, p39 =67},
{H3 =34, H2A =125, DNA =5, p32 =7},
{H3 =24, H4 =156, DNA =123, p12 =13}
)
And I'd like to
Now I've got an array of hashes, where each hash can have
different keys e.g.,
@aoh = ( {H3 =234, H1 =127, DNA =1, p135 =167},
{H4=24, H3=1550, DNA =25, p39 =67},
{H3 =34, H2A =125, DNA =5, p32 =7},
{H3 =24, H4 =156, DNA =123, p12 =13}
)
And
On Mon, May 06, 2002 at 12:22:15PM -0400, David Gray wrote:
Now I've got an array of hashes, where each hash can have
different keys e.g.,
@aoh = ( {H3 =234, H1 =127, DNA =1, p135 =167},
{H4=24, H3=1550, DNA =25, p39 =67},
{H3 =34, H2A =125, DNA =5, p32
Took me some time, but...
On Mon, May 06, 2002 at 04:41:03PM +0100, Richard Adams wrote:
Now I've got an array of hashes, where each hash can have different keys
e.g.,
@aoh = ( {H3 =234, H1 =127, DNA =1, p135 =167},
{H4=24, H3=1550, DNA =25, p39 =67},
{H3 =34,
23 matches
Mail list logo