cp command error check

2004-09-17 Thread Urs Wagner
Hello This does not work. `cp $srcfile $dstfile`; || do { print "cannot copy $srcfile to $dstfile"; }; do is also execute if cp working fine. Whz is this so? The next thing I would like to know how I can print the cp's error message. Thanks Urs -- To unsubscribe, e-mail: [EMAIL PROTEC

Line replace

2004-10-11 Thread Urs Wagner
Hello I should comment out lines in a text file. I have a lot of troubles to realize this. The lines Alpha(a, b, c) should be changed to # Alpha(a, b, c) What I would like to write is a small perl script to make this convetion. Thanks Urs -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

directory copy command

2004-09-28 Thread Urs Wagner
Hello Is there a similar perl command for directory copy like the File:Copy? I thinks this one does not work for directories. Thanks Urs -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

current directory

2004-09-29 Thread Urs Wagner
Hello How can I find out the current directory? I call chdir, afterwards I should switch back to the old one. Thanks Urs -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

flush function

2005-01-31 Thread Urs Wagner
Hello I have a problem on WinXP. In perl I want to read the tail of a file. The file is written with another windows program. If I am using a sleep(5) before of the read command I get the new tail content. It seems the program has longer to write it or it is buffered. Is there a command in perl