in reply to Re: Perl output on console as well as on text file
in thread Perl output on console as well as on text file

Thanku karl but following error is occuring 'tee-object' is not recognized as an internal or external command, operable program or batch file.

  • Comment on Re^2: Perl output on console as well as on text file

Replies are listed 'Best First'.
Re^3: Perl output on console as well as on text file
by karlgoethebier (Abbot) on Jan 06, 2015 at 12:23 UTC
    "... 'tee-object' is not recognized..."

    You mean the tee-object cmdlet doesn't work? This works for me:

    PS C:\Dokumente und Einstellungen\karl\Desktop\monks> perl -e 'print q +q(Hello world\n)' | tee-object -filepath shyamasoni-out.txt Hello world PS C:\Dokumente und Einstellungen\karl\Desktop\monks> cat shyamasoni-o +ut.txt Hello world

    Could you copy & paste the exact error you get from PS (activate Quick-Edit mode, mark region in PS with mouse, press ENTER and then CRTL-V...)?

    Update: See also Set-ExecutionPolicy Cmdlet.

    Regards, Karl

    «The Crux of the Biscuit is the Apostrophe»