Hi, I'm trying to use the File::Spec module to assist with creating scripts which will work on both linux and windows. I'm hitting a problem when I try to use the splitpath function. According to the manual, it should return the list ( $volume, $directories, $filename). However, when I try this under linux (RHEL4, File::Spec version 0.87):
use File::Spec::Functions qw(:ALL); ($volume,$directories,$filename)=splitpath("T:\subdir\scripts\testscript .pl"); print "volume=\'".$volume."\' directories=\'".$directories."\' filename=\'".$filename."\'\n"; exit(0); it gives: volume='' directories='' filename='T:subdirscripts estscript.pl' Under windows (XP pro, active perl 5.8.8, File::Spec version 3.12) the same code gives: volume='T:' directories='' filename='subdirscripts estscript.pl' I've hunted through the perl mailing list archives, and the web in general, and can't find anything relevant - which leads me to the assumption that I'm doing something wrong (and probably silly also.) What would be really useful would be an example of correct usage of the splitpath function: could someone e provide one (or any other pointer to what I'm doing wrong)? Thanks in advance. Apologies if this is an old chestnut. Peter
_______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs