On Wed, Sep 17, 2003 at 09:27:03AM +0100, Piers Cawley wrote:
> Joel Bernstein <[EMAIL PROTECTED]> writes:
> 
> > 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];
> > ?
> 
> 
> It's an index into a list, what else would it be? Perfectly good Perl
> idiom.

Thanks to all the people who confirmed this. I agree that it's
stylistically valid Perl, in fact I find it more elegant than any other
solution posited.

> 
> What's breaking?

Something else. I've fixed it now ;)

Thankyou all.

> 
/joel

Reply via email to