in reply to Parsing a list or Win32 filenames

If you're looking to parse a path into directories and the filename, use File::Basename or File::Spec. If you're just creating a path for the output (log) file, though, I'm not sure why you need the short format in the first place. You should be able to use long (complete) directory and file names on windows - it works for me.

HTH

Update: I just realized your question might be refering to parsing the command line, not just the filenames. If that's the case you'll have to look at @ARGV (see perlvar), which contains command line arguments. You might also want to consider using something like Getopt rather than pulling things out of @ARGV yourself.

Replies are listed 'Best First'.
Re^2: Parsing a list or Win32 filenames
by astroboy (Chaplain) on Sep 09, 2004 at 18:37 UTC
    Sorry, I wasn't clear. I'm not trying to pull apart a file name into directories and basenames - just loop through a file, take each line with Win32 filenames and convert the long names into short names. The new line will be passed to another application that can't deal with spaces in names