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
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
-
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
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 ent
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 D
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:
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:
>
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 curren
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
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
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" a
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 foll
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},
>
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 =
> 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, p1
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}
)
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 comman
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
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
> -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
&
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 array, showing
> the index and
> values. E.g.,
>
> @AoA = (
>
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 l
23 matches
Mail list logo