Re: Returning one item out of a list

2002-04-03 Thread Michael Kelly
Thanks all! I knew it was something like that. Parenths, not curlies... And thanks for the ref on File::Basename, too. Looks like I won't have to reinvent the wheel on that one. :) Thanks, -- Michael -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

RE: Returning one item out of a list

2002-04-03 Thread Wagner-David
4 To: 'Michael Kelly '; [EMAIL PROTECTED] Subject: RE: Returning one item out of a list I think what you're looking for is something like this: my $filename = split(/\//,$path)[7]; #assuming you want the seventh item I don't know how you would get the last one if you didn't

RE: Returning one item out of a list

2002-04-03 Thread Timothy Johnson
fitness for a particular purpose, or the fitness of the mind of the programmer. Please remember to spay or neuter your pets. -Original Message- From: Michael Kelly To: [EMAIL PROTECTED] Sent: 4/3/02 9:17 PM Subject: Returning one item out of a list Hey all, I seem to remember seeing thi

Re: Returning one item out of a list

2002-04-03 Thread Peter Scott
At 09:17 PM 4/3/02 -0800, Michael Kelly wrote: >Hey all, > >I seem to remember seeing this done somewhere, but now I can't figure out >how to do it now. > >If you have a function that returns a list, such as split(), is there a way >to only return one item from that list, as if you were working wi

Returning one item out of a list

2002-04-03 Thread Michael Kelly
Hey all, I seem to remember seeing this done somewhere, but now I can't figure out how to do it now. If you have a function that returns a list, such as split(), is there a way to only return one item from that list, as if you were working with an array? For instance, if you have something like