Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
No such thing as a small change
 
PerlMonks  

Re: Do and Die

by BaldPenguin (Friar)
on Aug 15, 2005 at 14:52 UTC ( [id://483944]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Do and Die

Is it possible that your $filename or $localpath could contain a space or othr illeagl character? I think I would try something like:
system('mv', "'$filename'", "'$localpath/archives/'") or Die ("data lo +ad","YTSMSC","High","Could not move file: $filename for successful ex +it: $@");

Don
WHITEPAGES.COM | INC
Everything I've learned in life can be summed up in a small perl script!

Replies are listed 'Best First'.
Re^2: Do and Die
by jimbus (Friar) on Aug 15, 2005 at 15:10 UTC

    I tried the following to test for spaces and try your suggestion:

    print "=$filename==$localpath/archives/=\n"; system('mv', "'$filename'", "'$localpath/archives/'") or Die ("data +load","YTSMSC","High","Could not move file: $filename for succ essful exit: $@");

    Running the code I got complaints from mv, but the or didn't kick in. but the files didn't move, wither. I did an ls with a cut and paste of one of the file names to proven that part is sound.

    [reports@clarkkent]/home/reports/ftp/YTSMSC50/test(11): ./t.pl >/home/reports/ftp/YTSMSC50/test/SMSC_COUNTERS_SMSC.0507200200<>/home/ +reports/ftp/YTSMSC50/test/archives/< mv: cannot access '/home/reports/ftp/YTSMSC50/test/SMSC_COUNTERS_SMSC. +0507200200' >/home/reports/ftp/YTSMSC50/test/SMSC_COUNTERS_SMSC.0507200215<>/home/ +reports/ftp/YTSMSC50/test/archives/< mv: cannot access '/home/reports/ftp/YTSMSC50/test/SMSC_COUNTERS_SMSC. +0507200215' >/home/reports/ftp/YTSMSC50/test/SMSC_COUNTERS_SMSC.0507200230<>/home/ +reports/ftp/YTSMSC50/test/archives/< mv: cannot access '/home/reports/ftp/YTSMSC50/test/SMSC_COUNTERS_SMSC. +0507200230' >/home/reports/ftp/YTSMSC50/test/SMSC_COUNTERS_SMSC.0507200245<>/home/ +reports/ftp/YTSMSC50/test/archives/< mv: cannot access '/home/reports/ftp/YTSMSC50/test/SMSC_COUNTERS_SMSC. +0507200245' [reports@clarkkent]/home/reports/ftp/YTSMSC50/test(12): ls archives sav2.pl SMSC_COU +NTERS_SMSC.0507200230 errors SMSC_COUNTERS_SMSC.0507200200 SMSC_COU +NTERS_SMSC.0507200245 sav1.pl SMSC_COUNTERS_SMSC.0507200215 t.pl [reports@clarkkent]/home/reports/ftp/YTSMSC50/test(13): ls /home/repor +ts/ftp/YTSMSC50/test/SMSC_COUNTERS_SMSC.0507200230 /home/reports/ftp/YTSMSC50/test/SMSC_COUNTERS_SMSC.0507200230 [reports@clarkkent]/home/reports/ftp/YTSMSC50/test(14): ls -l /home/re +ports/ftp/YTSMSC50/test/SMSC_COUNTERS_SMSC.0507200230 -rw-r--r-- 1 reports staff 47472 Aug 12 12:08 /home/reports/ft +p/YTSMSC50/test/SMSC_COUNTERS_SMSC.0507200230 [reports@clarkkent]/home/reports/ftp/YTSMSC50/test(15):
    Crazy Uncle Jimbus says, "Never moon a werewolf!"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://483944]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.