in reply to Re: Using the bang(!) in perl system commands
in thread Using the bang(!) in perl system commands

Thanks! That was a great little explanation.
I am using the tcsh shell, by the way - for which '>!' is legal, though redundant (with regard to my setup). Happy trails.

jOe
  • Comment on Re^2: Using the bang(!) in perl system commands

Replies are listed 'Best First'.
Re^3: Using the bang(!) in perl system commands
by derby (Abbot) on Jun 06, 2006 at 13:23 UTC

    More than likely your version of perl was built with some version of sh and system uses that. Some versions of sh (bash) have a noclobber setting that prevents overwriting of existing files. I would check either the user's shell settings (~/.bashrc for bash) or the default system settings (/etc/bashrc) for a noclobber setting and reset appropriately.

    If you cannot unset the noclobber setting, you will have to use the syntax appropriate for the shell being used by perl -- which for bash is the rather clumsy >|

    -derby