@rem = '--*-Perl-*-- @echo off if "%OS%" == "Windows_NT" goto WinNT perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl :WinNT perl -x -S %0 %* if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl if %errorlevel% == 9009 echo You do not have Perl in your PATH. if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul goto endofperl @rem '; #!/usr/bin/perl -w #line 15 #testprob.bat use strict; use Getopt::Long; # Print Argument list prior to calling GetOptions print STDERR join("|", @ARGV), "\n"; my $always = ''; my $col = -1; my $recursive = ''; my $verbose = 0; print STDERR "(GetOptions called here)\n"; GetOptions ('always!' => \$always, 'recursive!' => \$recursive, 'col=i' => \$col, 'verbose!' => \$verbose); # Print Argument list after calling GetOptions print STDERR join("|", @ARGV), "\n"; wait_close("Process completed\n",4); sub wait_close{ my ($warning, $timer) = @_; $timer = int($timer) || 2; my $i; print "$warning\n"; for ($i=$timer; $i >= 1; $i--){ print "window will close in $i \r"; sleep 1; } exit; } __END__ :endofperl