From: Andy Dougherty Date: Wed, 17 Feb 1999 17:22:50 +0000 (-0500) Subject: dotsh.pl triggers new warnings X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=90758174239a95c621502dd02117d0858a5cf50b;p=p5sagit%2Fp5-mst-13.2.git dotsh.pl triggers new warnings Message-Id: p4raw-id: //depot/perl@2973 --- diff --git a/lib/dotsh.pl b/lib/dotsh.pl index 877467e..4982b17 100644 --- a/lib/dotsh.pl +++ b/lib/dotsh.pl @@ -26,7 +26,9 @@ # sub dotsh { local(@sh) = @_; - local($tmp,$key,$shell,*dotsh,$command,$args,$vars) = ''; + local($tmp,$key,$shell,$command,$args,$vars) = ''; + local(*dotsh); + undef *dotsh; $dotsh = shift(@sh); @dotsh = split (/\s/, $dotsh); $command = shift (@dotsh); @@ -37,7 +39,7 @@ sub dotsh { $shell = "$1 -c" if ($_ =~ /^\#\!\s*(\S+(\/sh|\/ksh|\/zsh|\/csh))\s*$/); close (_SH_ENV); if (!$shell) { - if ($ENV{'SHELL'} =~ /\/sh$|\/ksh$|\/zsh$|\/csh$/) { + if ($ENV{'SHELL'} =~ /\/sh$|\/ksh$|\/zsh$|\/bash$|\/csh$/) { $shell = "$ENV{'SHELL'} -c"; } else { print "SHELL not recognized!\nUsing /bin/sh...\n";