in reply to changing the path name to unix style.
I don't know as it is a "builtin" but you could use File::Spec to achieve the same results.
use strict; use File::Spec; use File::Spec::Unix; my $path = "C:\\Dir1\\Dir2"; print "Path before change :$path:\n"; $path =~ s/\\/\//g; print "Path after change :$path:\n"; ##################################### my $fs_path = File::Spec->catdir('C:','Dir1','Dir2'); print "Path before change :$fs_path:\n"; $fs_path=File::Spec::Unix->catdir($fs_path); print "Path after change :$fs_path:\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: changing the path name to unix style.
by Fletch (Bishop) on Dec 13, 2006 at 14:45 UTC | |
Re^2: changing the path name to unix style.
by parv (Parson) on Dec 14, 2006 at 00:30 UTC |
In Section
Seekers of Perl Wisdom