Deleting a file while other script still appending to

2008-02-07 Thread Mahdi A Sbeih
Hi all, I have a script that logs activities to a txt log file. I noticed that when deleting the file from another window or shell, the script stops writing to the file. I was expecting something like the unix shell, which is creating a new file and appending to it. execute this script: #!/u

Re: Running the same perl script on Win32 and Unix

2006-09-07 Thread Mahdi A Sbeih
Thanks Rob, this worked just perfect. Yes, you picked the right first name, thanks allot. -Mahdi. Rob Dixon wrote: Mahdi A Sbeih wrote: > Hi there, > > I have a perl script that will run on both Unix and Windows platforms, > the only problem I am having is below: > >

Running the same perl script on Win32 and Unix

2006-09-07 Thread Mahdi A Sbeih
Hi there, I have a perl script that will run on both Unix and Windows platforms, the only problem I am having is below: use Win32::Process; I have to use the above only for windows since later in my script: if ($platform eq 'UNIX') { system("$Cmd > /dev/null 2>&1 &"); } elsi

Re: calling a perl script on windows

2006-07-12 Thread Mahdi A Sbeih
Hi Chandru, Do I need to go to windows_explorer->Tools->Folder Options->File Types and associating the extension ".pl" with the "perl" executable? What if the perl is in the D: drive not C:, also do I need to specify ".exe" Thanks, Mahdi. Chandru wro

calling a perl script on windows

2006-07-11 Thread Mahdi A Sbeih
Hi all, I am working on porting some scripts from unix to windows, and I noticed that perl ignores the first line of the script, and it seems I have to run the script like this: D:\Perl\bin\perl.exe myscript.pl if I run it like we do on unix: ./myscript.pl it will search the path and it uses

nohup using perl

2006-07-10 Thread Mahdi A Sbeih
Hi all, I am porting a shell script written in korn shell to perl, and i want to see what is the best way to port the "nohup" shell command in perl, anyone knows? Thanks, Mahdi. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

backslash on windows

2006-07-10 Thread Mahdi A Sbeih
Hello all, I am testing a perl script on windows platforms, but i am facing an issue with the path using "\" such as: myscript.pl -cfg D:\users\config.txt inside the script, when capturing the config file mentioned above, the "\" is treated as escape character. How can i get around this p

Re: using backticks

2006-07-09 Thread Mahdi A Sbeih
Hi Ron, Thank you very very much, -Mahdi. Rob Dixon wrote: Mahdi A Sbeih wrote: > > I am using the below code: > > $fmtFile = `$dpImportCmd`; > .. > .. > unlink($fmtFile) || die "unable to remove $fmtFile\n"; > > > dpImportCmd, is a program that gene

using backticks

2006-07-09 Thread Mahdi A Sbeih
I am using the below code: $fmtFile = `$dpImportCmd`; .. .. unlink($fmtFile) || die "unable to remove $fmtFile\n"; dpImportCmd, is a program that generates a text file, this text file name is now in the variable: $fmtFile. Later in the program, I want to delete this file, but it fails. I don'