in reply to Re^3: How do I use grep in a script
in thread How do I use grep in a script

It is usually a recommended good practice not to shell out to the system when you can avoid it. And there are many good reasons for that, security and portability just to name a few. I think it should be avoided especially when the commands you want to run exists in core Perl.

See, for example, Calling External Commands More Safely and The problem of "the" default shell.

Replies are listed 'Best First'.
Re^5: How do I use grep in a script
by ForgotPasswordAgain (Vicar) on Dec 28, 2017 at 00:30 UTC
    I don't need a lecture. You cited more things irrelevant to this problem: "Good practice", Security, Portability (previously "counterproductive"). My answer was perfectly fine in context.
      "I don't need a lecture..."

      Who knows. But accepting friendly and good advice from some experienced fellow monks isn't a bad thing. And good practice, security and portability always matters.

      «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

      I don't need a lecture.
      Alright, sorry about that, I guess I should try to remember not to answer your posts anymore. If I forget, please kindly remind me that you're not open to discussion.
        Sorry, I regret that particular sentence. (That was counterproductive. I still disagree that my original reply was, though.)