Re: list-parsing problem

2003-10-06 Thread Steve Grazzini
On Tue, Oct 07, 2003 at 01:09:26AM +0200, Kevin Pfeiffer wrote: > I just noticed that: > > print join ", ", @list, "\n"; > > produces output such as: > > a, > a, b, c, > > whereas: > > print join(", ", @list), "\n"; > > produces: > > a > a, b, c > > (no trailing comma) -- strange... I think

RE: list-parsing problem

2003-10-06 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Thomas bätzler wrote: > Marcus Claesson [mailto:[EMAIL PROTECTED] asked: >> I have a silly little list-parsing problem that I can't get my head >> around, and I'm sure some of you have come across it before. > > Sure. Looks lik

Re: list-parsing problem

2003-09-19 Thread John W. Krahn
Marcus Claesson wrote: > > Hi People, Hello, > I have a silly little list-parsing problem that I can't get my head > around, and I'm sure some of you have come across it before. > > I have a list like this: > > 1 a > 2 b > 2 c > 3

RE: list-parsing problem

2003-09-19 Thread EUROSPACE SZARINDAR
[EMAIL PROTECTED] Objet: RE: list-parsing problem Homework's sorted ;)! Thanks a lot Thomas, it worked fine! Marcus On Thu, 2003-09-18 at 10:41, Thomas Bätzler wrote: > Marcus Claesson [mailto:[EMAIL PROTECTED] asked: > > I have a silly little list-parsing problem that I can't g

RE: list-parsing problem

2003-09-19 Thread Thomas Bätzler
Marcus Claesson [mailto:[EMAIL PROTECTED] asked: > I have a silly little list-parsing problem that I can't get my head > around, and I'm sure some of you have come across it before. Sure. Looks like homework ;-) HTH, Thomas #!/usr/bin/perl -w use strict; my %unique; while

RE: list-parsing problem

2003-09-19 Thread EUROSPACE SZARINDAR
Objet: list-parsing problem Hi People, I have a silly little list-parsing problem that I can't get my head around, and I'm sure some of you have come across it before. I have a list like this: 1 a 2 b 2 c 3 a 4 d 4 d 4 e 4 f 5 g and

Re: list-parsing problem

2003-09-18 Thread Gary Stainburn
On Thursday 18 Sep 2003 10:26 am, Marcus Claesson wrote: > Hi People, > > I have a silly little list-parsing problem that I can't get my head > around, and I'm sure some of you have come across it before. > > I have a list like this: > > 1 a > 2 b &g

RE: list-parsing problem

2003-09-18 Thread Charles K. Clarkson
Marcus Claesson <[EMAIL PROTECTED]> : : But I just have one question before trying it out. : Isn't the key order in a hash randomised, which in : this case means I wouldn't get first column in : numerical order as I wanted? You didn't state what order in the problem not did you say that the f

RE: list-parsing problem

2003-09-18 Thread Marcus Claesson
Homework's sorted ;)! Thanks a lot Thomas, it worked fine! Marcus On Thu, 2003-09-18 at 10:41, Thomas Bätzler wrote: > Marcus Claesson [mailto:[EMAIL PROTECTED] asked: > > I have a silly little list-parsing problem that I can't get my head > > around, and I'm sure s

RE: list-parsing problem

2003-09-18 Thread Charles K. Clarkson
Marcus Claesson <[EMAIL PROTECTED]> wrote : : I have a silly little list-parsing problem that I can't get : my head around, and I'm sure some of you have come across : it before. : : I have a list like this: : : 1 a : 2 b : 2 c : 3 a : 4 d : 4 d : 4

RE: list-parsing problem

2003-09-18 Thread Marcus Claesson
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Objet: list-parsing problem > > > Hi People, > > I have a silly little list-parsing problem that I can't get my head > around, and I'm sure some of you have come across it before. > > I have a list like this: &

RE: list-parsing problem

2003-09-18 Thread Stephen Hardisty
Two dimensional hash perhaps? Where the first column is the first dimension and the second is, well, the second. E.g. while() { ($col1, $col2) = split(/$delimeter/, chomp($_)); $blah{$col1}{$col2} = 1; } Hope this helps. _

list-parsing problem

2003-09-18 Thread Marcus Claesson
Hi People, I have a silly little list-parsing problem that I can't get my head around, and I'm sure some of you have come across it before. I have a list like this: 1 a 2 b 2 c 3 a 4 d 4 d 4 e 4 f 5 g and I want to make the first