http://www.perlmonks.org?node_id=57603


in reply to how to invoke unix commands in perl

why bother with unix at all?

perl -e "while(<>){} print qq($.\n);" filename

Replies are listed 'Best First'.
Re^2: how to invoke unix commands in perl
by Anonymous Monk on Oct 28, 2004 at 07:06 UTC
    But how to invoke setenv or source commands in perl These are built-in shell commands. -Bhanu
      Those particular commands would be useless anyway because they only take effect for the current shell which would be exited anyway once the OS call is done.
      how about with system("what ever you want to do in unix"); ?