"FlashGuy" <[EMAIL PROTECTED]> writes: > Hi all, > > I have the following line in my Perl script > > $test=$ARGV[0] which dumps the following results > > =D:\temp\test\filename > > I need to extract only the "filename" to the right of the last "\" and put that into >a variable. > There could only be one "\" in the path or possibly more. This will vary based on >directory structure. > > How would I go about this?
use File::Spec->splitpath - Look for 'splitpath' in `perldoc File::Spec` or `perldoc File::Spec::Win32` -RN -- Robin Norwood Red Hat, Inc. "The Sage does nothing, yet nothing remains undone." -Lao Tzu, Te Tao Ching -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
