summaryrefslogtreecommitdiff
path: root/lib/dotsh.pl
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafayette.edu>1999-02-17 12:22:50 -0500
committerGurusamy Sarathy <gsar@cpan.org>1999-02-18 17:10:49 +0000
commit90758174239a95c621502dd02117d0858a5cf50b (patch)
treee4e1b96ba16216dcf2864c45ea350a1c7ca4a7bb /lib/dotsh.pl
parent5a930efa650ced24646f928bb6e40ff8f58cc53c (diff)
downloadperl-90758174239a95c621502dd02117d0858a5cf50b.tar.gz
dotsh.pl triggers new warnings
Message-Id: <Pine.GSU.4.05.9902171720490.17243-100000@newton.phys> p4raw-id: //depot/perl@2973
Diffstat (limited to 'lib/dotsh.pl')
-rw-r--r--lib/dotsh.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/dotsh.pl b/lib/dotsh.pl
index 877467eb96..4982b17d8c 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";