Perl/Perlfaq3-22 페이지의 소스 보기
마지막으로 [b]
-- Loading page list... --
내용출력
로그인[l]
Diary
[f]
최근변경내역
[r]
페이지목록[i]
횡설수설[2]
게시판[3]
링크
수정할 수 없습니다: Perl/Perlfaq3-22 는 읽기 전용 페이지입니다.
== # MS-DOS, NT 등에서 쉬뱅라인이 작동하게 하는 법 (How can I get #!perl to work on [MS-DOS,NT,...]?) == 원문: http://faq.perl.org/perlfaq3.html#How_can_I_get_perl_t (다른 운영체제는 [[주인장]]이 써 본 적이 없어서 번역하지 않았음) For OS/2 just use extproc perl -S -your_switches as the first line in "*.cmd" file ("-S" due to a bug in cmd.exe's "extproc" handling). For DOS one should first invent a corresponding batch file and codify it in "ALTERNATE_SHEBANG" (see the dosish.h file in the source distribution for more information). ActiveState Perl을 Win95/NT 환경에서 설치한다면 ".pl" 확장자가 perl 인터프리터에 연결되도록 레지스트리를 수정할 것이다. 다른 설치본을 사용하거나, gcc의 윈도우 포팅(cygwin 또는 mingw32 등)을 사용하여 표준 소스코드로부터 Win95/NT Perl을 빌드하는 경우, 레지스트리를 직접 수정해야 할 것이다. ".pl" 확장자를 인터프리터와 연결하는 것 말고도, NT 사용자는 "SET PATHEXT=%PATHEXT%;.PL"이라고 설정함으로써 "install-linux.pl" 프로그램을 "install-linux"만 타이핑하고도 실행할 수 있다. Under "Classic" MacOS, a perl program will have the appropriate Creator and Type, so that double-clicking them will invoke the MacPerl application. Under Mac OS X, clickable apps can be made from any "#!" script using Wil Sanchez' DropScript utility: http://www.wsanchez.net/software/ . *IMPORTANT!*: Whatever you do, PLEASE don't get frustrated, and just throw the perl interpreter into your cgi-bin directory, in order to get your programs working for a web server. This is an EXTREMELY big security risk. Take the time to figure out how to do it correctly. == # 주인장 보충 == 주인장은 Strawberry Perl 5.10 을 사용하는 데, 다음과 같이 설정해 주었다. * 시스템 등록 정보 - 고급 - 환경 변수 - 사용자 변수에 가서 다음 변수 추가 ** 변수 : PATHEXT ** 값 : %PATHEXT%;.PL ** Path 변수는 시스템 변수와 사용자 변수를 각각 별개로 작성해줘도 명령 프롬프트 창 띄워보면 잘 합쳐지던데, 이 변수는 %PATHEXT%를 명시해 주지 않으면 .PL 만 남아버리더라... -_-? * 윈도우 탐색기 메뉴 - 도구 - 폴더 옵션 - 파일 형식 - .PL 파일 선택 - 고급 ** 새로 만들기 *** 명령 : Open *** 명령을 실행할 응용 프로그램 : D:\strawberry\perl\bin\perl.exe "%1" %* ** 새로 만들기 (탐색기에서 우클릭-편집 했을 때 ViEditor로 편집하기 위해서) *** 명령 : Edit *** 명령을 실행할 응용 프로그램 : D:\Local\Vim\vim62\gvim.exe "%1" 이제 test.pl 파일을 실행하기 위해서 {{{ > perl D:\perl\test.pl hello world 대신에 > D:\perl\test hello world 또는, 만일 D:\perl 폴더가 PATH에 포함되어 있다면 > test hello world }}} 만으로 실행할 수 있다. :-)
[http://kldp.org/node/104120 (윈도우) .bat 파일에서 사용하는 "%*"와 탐색기에서 파일 형식 편집할 때 쓰는 "%*"의 의미가 다릅니까? | KLDP] 참고
----
---- [[컴퓨터분류]] [[Perl]] [[/Perlfaq]]
Perl/Perlfaq3-22
페이지로 돌아가기 |
다른 수정본 보기