Re: File::Spec-splitpath

2007-07-04 Thread Tom Phoenix
On 7/4/07, Joseph L. Casale [EMAIL PROTECTED] wrote: ($volume,$directories,$file) = File::Spechttp://perldoc.perl.org/File/Spec.html-splitpath( $path ); I am leveraging this fine, but would like to shove the last directory from the path in $directories into a new var. Is there a function

RE: File::Spec-splitpath

2007-07-04 Thread Joseph L. Casale
L. Casale Cc: beginners@perl.org Subject: Re: File::Spec-splitpath On 7/4/07, Joseph L. Casale [EMAIL PROTECTED] wrote: ($volume,$directories,$file) = File::Spechttp://perldoc.perl.org/File/Spec.html-splitpath( $path ); I am leveraging this fine, but would like to shove the last directory

Re: File::Spec-splitpath

2007-07-04 Thread Tom Phoenix
On 7/4/07, Joseph L. Casale [EMAIL PROTECTED] wrote: Just found that. I suppose I could use it, then get the size of the array and use the last indices? Is there a cleaner way to do it? pop? --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: File::Spec-splitpath

2007-07-04 Thread Chas Owens
On 7/4/07, Joseph L. Casale [EMAIL PROTECTED] wrote: Just found that. I suppose I could use it, then get the size of the array and use the last indices? Is there a cleaner way to do it? Thanks! jlc snip You can use negative indices to count from the end of the array: my @a = (1, 2, 3, 4, 5,

RE: File::Spec-splitpath

2007-07-04 Thread Joseph L. Casale
Dang, you perl guys thought of everything! Thanks! jlc From: Chas Owens [EMAIL PROTECTED] Sent: Wednesday, July 04, 2007 3:21 PM To: Joseph L. Casale Cc: Tom Phoenix; beginners@perl.org Subject: Re: File::Spec-splitpath On 7/4/07, Joseph L. Casale [EMAIL