Thread Pfadübergabe (18 answers)
Opened by nastja at 2010-04-15 17:27

pq
 2010-04-16 00:09
#136144 #136144
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
ist eigentlich recht einfach, steht ja alles in der doku:
Code (perl): (dl )
1
2
3
4
5
6
7
use File::Spec;

my ($volume, $directories, $file) = File::Spec->splitpath( $path );
my @dirs = File::Spec->splitdir( $directories );

$directories = File::Spec->catdir( "NEWDIR", @dirs );
my $newpath = File::Spec->catpath( $volume, $directories, $file );
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread Pfadübergabe