Dear Anonymous Monk
Thanks a mil for your help.
I used your code to check and found out that umlauts were the culprits
I created a test folder with test file and ran the code. To my surprise I got new error messages (cf. list below), which have not yet appeared... As you can imagine, the source files remained untouched and no back-up files were created
Use of uninitialized value $dst in rename at C:/strawberry/perl/site/l
+ib/Path/Tiny.pm line 1004.
Path::Tiny::move(Path::Tiny=ARRAY(0x267ea6c), undef) called at hor
+nbach_entities_20140902.pl line 68
main::Replace(Path::Tiny=ARRAY(0x267ea6c), "T:/2014/F.../C.../a.xm
+l-2014-09-03.bak") called at script.pl line 59
main::RetrieveAndBackupXML("t:/F.../C.../\") called at script.pl l
+ine 29
main::Main() called at script.pl line 18
Use of uninitialized value $dst in concatenation (.) or string at C:/s
+trawberry/perl/site/lib/Path/Tiny.pm line 1004.
Path::Tiny::move(Path::Tiny=ARRAY(0x267ea6c), undef) called at scr
+ipt.pl line 68
main::Replace(Path::Tiny=ARRAY(0x267ea6c), "T://F.../C.../a.xml-20
+14-09-03.bak") called at hornbach_entities_20140902.pl line 59
main::RetrieveAndBackupXML("t:\\2014\\F...\\C...\\") called at hor
+nbach_entities_20140902.pl line 29
main::Main() called at hornbach_entities_20140902.pl line 18
Error rename on 'T:/2014/F.../C...//a.xml' -> ''': at C:/strawberry/p
+erl/site/lib/Path/Tiny.pm line 1490.
Path::Tiny::Error::throw("Path::Tiny::Error", "rename", "T::/2014/
+F.../C.../a.xml' -> ''", "") called at C:/strawberry/perl/site/lib/Pa
+th/Tiny.pm line 126
Path::Tiny::_throw(Path::Tiny=ARRAY(0x267ea6c), "rename", "T:/2014
+/F.../C.../a.xml' -> ''") called at C:/strawberry/perl/site/lib/Path/
+Tiny.pm line 1004
Path::Tiny::move(Path::Tiny=ARRAY(0x267ea6c), undef) called at scr
+ipt.pl line 68
main::Replace(Path::Tiny=ARRAY(0x267ea6c)...[...]
I seem unable to figure what the exact meaning of the error is, I reckon it must be something in the xml-files,
I am really sorry for all these questions, however it is a good way to learn things.
Thanks a mil for your support
Kind regards
C. |