in reply to Capturing all (and I mean all) output to a file

Ha

If you hate installing Modules often then here are two shortcuts.

The simple solution would be run all the system comman in the scriptname.pl with >outfile for first time and use >>outfile for all the remaining system commands.

eg: system("ls -l >/tmp/temp.log")

The other solution is use the help of backticks run all your commands as $ouput=`command` and write the variable $output to a standard file.


Thanks
SasiKumar
  • Comment on Re: Capturing all (and I mean all) output to a file

Replies are listed 'Best First'.
Re^2: Capturing all (and I mean all) output to a file
by Mutant (Priest) on Jan 12, 2005 at 10:47 UTC

    If you hate installing Modules often then here are two shortcuts.

    If you hate installing modules, then maybe you shouldn't be using Perl :)

      If you hate installing modules, then maybe you shouldn't be using Perl :)

      This is the difference between perl and other languages. There are 100 ways to solve a problem.

      mutant i dont want to install modules for simpler reasons when there is a easy work around.

      Thanks
      SasiKumar
        I agree.. I was just (trying) to make a joke about a general hatred of modules not really being a goood thing with Perl.