> Hi, > > I am executing a system command through a Perl script. > As of now if the system command succeeds it goes to > the output file and if the command fails it does not. > > Is there anyway of piping error messages also to the > output file if the command does not execute properly?
system('ls -la 2>>out.txt >>out.txt'); note that is form appends to the output file, rather than create a brand new one. Also not portable. > PLease let me know how this can be done in Perl? Use shell syntax for this task. Jonathan Paton __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]