On Tue, 16 Sep 2003, Joel Bernstein wrote: > > I have a problem with some code which I'm trying to debug. I'm not > certain, but I think perhaps I'm doing something wrong in the following > line - perhaps inadvertently creating an array slice? > > what do you understand by the line: > my $foo=( split ',' => $line )[7]; > ?
I understand that you should have used two lines. Why not do so? my @tmp = split /,/, $line; my $foo = $tmp[7]; S. > i'm trying to get the split to return an array, of which I then get the > 7th element (and assign to $foo). > > /joel > > > -- Shevek http://www.anarres.org/ I am the Borg. http://www.gothnicity.org/