how to capture console output by using perl?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ravikishore
    New Member
    • May 2010
    • 1

    how to capture console output by using perl?

    How do I capture console output by using perl?

    We are running some commands in console. My intention is to capture and save that output by using a Perl script.
    Last edited by Niheel; May 19 '10, 03:29 PM. Reason: merge question details
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    I am not 100% on what you are asking about, but maybe this will help you.

    Regards,

    Jeff

    Comment

    • chaarmann
      Recognized Expert Contributor
      • Nov 2007
      • 785

      #3
      On Unix, all commands are already captured in the history file.
      Or do you want to program a keyboard hook in perl in Windows? That would be a difficult task. But you can easily write a perl program that emulates a shell:

      The user starts the perl program and then types his shell commands inside, which are then standard input for perl. The perl program then both executes (system $command, see link from numberwhun) the commands and saves them in a file.

      Comment

      Working...