in reply to Re^2: Preprocessing print statements
in thread Preprocessing print statements

for which part?

replacing print with a sub out() should be straight forward.

Opening a FH to a var is described in open#Opening-a-filehandle-into-an-in-memory-scalar and you already mentioned select

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^4: Preprocessing print statements
by karlgoethebier (Abbot) on Nov 12, 2020 at 07:12 UTC
    "... straight forward..."

    The classic 24/7 support talk.

    Phone call round midnight:

    Customer: "I got this nose/cuke problem." Support: "Replace nose with cuke. Customer: "But i don't understand!" Support: "The solution is obvious. Good night."

    Situation in the morning AKA aftermath:

    [] All servers shutdown [] All airplanes grounded [] Perlmonks offline [] No transactions today [] All centrifuges bursted [] Don T. stays in office

    Whatever could happen. But then you are fired.

    «The Crux of the Biscuit is the Apostrophe»

    perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

      > Customer:"I got this nose/cuke problem."

      Support: "Which part? Nose or cuke?

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

        Customer: "I don't know!" Best regards, KGB

        «The Crux of the Biscuit is the Apostrophe»

        perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help