Last active
December 21, 2015 05:18
-
-
Save mamemomonga/6255796 to your computer and use it in GitHub Desktop.
Windows7 x64 バッチファイルからActive Perl(64bit)でHello World!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem --------------------------------------------------------------------------- | |
rem Windows7 x64 バッチファイルからActive Perl(64bit)でHello World! | |
rem Shift_JIS(cp932)で保存すること | |
rem --------------------------------------------------------------------------- | |
set OPATH=%PATH% | |
set PATH=C:\Perl64\bin;%PATH% | |
perl -x -S %0 %* | |
goto endofperl | |
@rem '; | |
#!perl | |
use strict; | |
use warnings; | |
use encoding 'cp932'; | |
use English; | |
print "Hello World!\n"; | |
print "こんにちは\n"; | |
foreach(qw( EXECUTABLE_NAME PERL_VERSION OSNAME )) { | |
print "$_: ".(eval "\$$_")."\n"; | |
} | |
for(my $i=0;$i<=$#ARGV;$i++) { | |
print "ARGV[$i]: $ARGV[$i]\n"; | |
} | |
__END__ | |
:endofperl | |
set PATH=%OPATH% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment