1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# kopiere die Konfigurationsdaten ins Zielverzeichnis
my ($src, $dst) = map { noslashatend( dos2unix($_) ) } @_;
die "Not a directory" unless -d $src;
mkdir $dst;
if(opendir(my $dir, $src)) {
while(my $file = readdir $dir) {
next if $file =~ m!^\.\.?$!;
my $srcpath = "$src/$file";
my $dstpath = "$dst/$file";
if(-d $srcpath) {
copy_recursive("C:\\Beispieldaten\\Konfigurationsdaten", "C:\\Temp\\html");
} else {
File::Copy::copy( $srcpath, $dstpath );
}
}
closedir $dir;
}
sub noslashatend {
my $path = shift || '';
$path =~ s!/+$!;
return $path;
}
sub dos2unix {
my $path = shift || '';
$path =~ s!\\!/g!;
return $path;
}
noch immer gleiche fehlermeldung
Backslash found where operator expected at main.pl line 269, near "$path =~ s!\"
(Might be a runaway multi-line !! string starting on line 263)
(Missing operator before \?)
syntax error at main.pl line 269, near "$path =~ s!\"
Search pattern not terminated at main.pl line 269.