From: Gurusamy Sarathy Date: Wed, 23 Sep 1998 09:42:17 +0000 (+0000) Subject: pl2bat tweak from Tye McQueen X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a8ac1e791509ee4f5fa77a7b6e495add327ee573;p=p5sagit%2Fp5-mst-13.2.git pl2bat tweak from Tye McQueen p4raw-id: //depot/perl@1840 --- diff --git a/win32/bin/pl2bat.pl b/win32/bin/pl2bat.pl index 121d784..2fa8088 100644 --- a/win32/bin/pl2bat.pl +++ b/win32/bin/pl2bat.pl @@ -80,6 +80,8 @@ sub process { my $linenum = 0; my $skiplines = 0; my $line; + my $start= $Config{startperl}; + $start= "#!perl" unless $start =~ /^#!.*perl/; open( FILE, $file ) or die "$0: Can't open $file: $!"; @file = ; foreach $line ( @file ) { @@ -109,7 +111,7 @@ sub process { $file .= '.bat' unless $file =~ /\.bat$/i or $file =~ /^-$/; open( FILE, ">$file" ) or die "Can't open $file: $!"; print FILE $myhead; - print FILE $Config{startperl}, ( $OPT{'w'} ? " -w" : "" ), + print FILE $start, ( $OPT{'w'} ? " -w" : "" ), "\n#line ", ($headlines+1), "\n" unless $linedone; print FILE @file[$skiplines..$#file]; print FILE $tail unless $taildone;