Hi : The following program needs to print the output of the cmd run to a log file, it takes care of the directory separator issue, so the log file could be created on any platform depending on where the program is run. But there is something missing ie the log file i am creating via this program does not really get created after the program is done execution. Does the file need to be physically present on the system? can I create it on fly via the program.
#!/usr/local/bin/perl5.6 -w #!/bin/tcsh use strict; use Cwd; use File::Spec::Functions; my $curdir = getcwd(); my $cmd1 = 'ls -l'; my $newlog = catfile(curdir(), $curdir, 'automate.log'); system("$cmd1 | tee -a $newlog") ; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>