my @in = ;
foreach $xx (@in) { ---and so on
instead of the "while" loop and that took appr. 30 sek - alas not as slow as
"Tie"
Cheers,
Jakob
> -Oprindelig meddelelse-
> Fra: Janek Schleicher [mailto:[EMAIL PROTECTED]
> Sendt: 6. august 2003 12:10
> Til: [EM
--Jakob Kofoed <[EMAIL PROTECTED]> wrote:
I am trying to get the maximum number in a file looking like:
1 5001
2 5002
3 5003
4 5004
5 5005
6 5006
7 5007
8 5008
9 5009
10 5010
11 5011
12 5012
13 5013
14 5014
15 5015
16 5016
17 5017
18 5018
19 5019
How about so
Jakob Kofoed wrote at Tue, 05 Aug 2003 23:33:29 +0200:
> I am trying to get the maximum number in a file looking like:
>
> 1 5001
> [...]
> 19 5019
>
>
> I had the idea to push the individual line in a row into a array and se
> the List::Util module - but I cant get it to work.
Yet another
Hi,
I am trying to get the maximum number in a file looking like:
1 5001
2 5002
3 5003
4 5004
5 5005
6 5006
7 5007
8 5008
9 5009
10 5010
11 5011
12 5012
13 5013
14 5014
15 5015
16 5016
17 5017
18 5018
19 5019
I had the idea to push the individual line in a
Jakob Kofoed wrote:
>
> Hi,
Hello,
> I am trying to get the maximum number in a file looking like:
>
> 1 5001
> 2 5002
> 3 5003
> 4 5004
> 5 5005
> 6 5006
> 7 5007
> 8 5008
> 9 5009
> 10 5010
> 11 5011
> 12 5012
> 13 5013
> 14 5014
> 15 5015
> 16 5016
> 17 5017
On Aug 5, Jakob Kofoed said:
>1 5001
>2 5002
>3 5003
[snip]
Are those line numbers actually in the file too? If so, that might cause
problems for you.
>open IN, "<", "num2.txt";
>my @in = ;
At this point, @in holds all the lines of the file...
>push @col1, $in[0];
... but here, you onl
On Aug 6, Jakob Kofoed said:
>use List::Util qw(first max min);
You don't use first(), so don't both exporting it.
>open IN, "<", "num.txt";
>
>while ($xx = ) {
> chomp $xx;
> my @xx = split (/\s+/, $xx);
> push @col1, $xx[0];
Those three lines could just be:
push @col1,