PCB论坛网

 找回密码
 注册
楼主: justwin

genesis 運行perl scripts?

[复制链接]
 楼主| 发表于 2004-7-15 21:31:21 | 显示全部楼层

***********ERROR 15Jul2004.213959.000 GET 288 genesis 08.0 Windows NT

gen_csh-10004-Script exited Script D:/1/server.pl ended with error:

ARGV: Undefined variable.

請教前輩: 為何ARGV 指令,Genesis無法認得? 是否那個設定錯了呢??? 謝謝

[em06][em06][em06]
回复 支持 反对

使用道具 举报

发表于 2004-7-15 23:48:12 | 显示全部楼层
以下是引用justwin在2004-7-13 14:00:28的发言:

這些步驟好像都要ok才行嗎?

The following steps are needed to enable Perl scripts under Genesis:

1. Obtain Perl 2. Install Perl 3. Install the Perl files enabling sockets------這項需請教? 4. Change /etc/services------這項需請教? 5. Inspect the files in /genesis/eNN/all/perl 6. Install Genesis.pm 7. Read rules regarding Perl scripts 8. Run the example script 9. Debugging 10. Remote debugging 請再賜教..謝謝前輩

你是windows版吧....對了....Asics安安 ^_^

首先......C:\WINDOWS\system32\drivers\etc\services加入

genesis 56753/tcp # Genesis port for scripts

然後到c:\Perl\site\lib執行h2ph * sys/*

然後將Genesis.pm及server.pl copy到 /perl/lib/這樣就不用每次都須鍵入use lib qw(/genesis/e82/all/perl) ;這行

然後就照著用............. [em07]

若還有問題就post上來

回复 支持 反对

使用道具 举报

 楼主| 发表于 2004-7-16 09:12:49 | 显示全部楼层

C:\Perl\site\lib>h2ph * sys/* Skipping `*': not a file or directory Skipping `sys/*': not a file or directory

好像有此訊息產生....

[em06]
回复 支持 反对

使用道具 举报

 楼主| 发表于 2004-7-16 09:24:57 | 显示全部楼层

我的genesis.pm 為 2,891 位元組 有和你一樣嗎?

[em06]
回复 支持 反对

使用道具 举报

 楼主| 发表于 2004-7-16 10:26:33 | 显示全部楼层

gen_csh-10004-Script exited Script F:/6/example.pl ended with error:

use: Command not found.---------------------為何會無法執行???? 板主賜教..

[em06]
回复 支持 反对

使用道具 举报

发表于 2004-7-16 12:27:33 | 显示全部楼层
以下是引用justwin在2004-7-16 9:24:57的发言:

我的genesis.pm 為 2,891 位元組 有和你一樣嗎?

[em06]

一樣!

我之前都是在unix及linux下使用perl跑genesis,

我有空試試在windows下跑看看.............然後再貼上來.........

perl萬歲!!!!!!!!!

回复 支持 反对

使用道具 举报

发表于 2004-7-17 14:56:08 | 显示全部楼层
以下內容感謝Asics提供
1. csh.exe
2. cd c:\perl\lib\core
3. h2ph.bat * sys/*
4. 會在c:\perl\site\lib\下產生*.ph
5. 在c:\winnt\system32\drivers\etc\services加入genesis     56753/tcp                 # Genesis port for scripts
6. 將Genesis.pm   server.pl copy到c:\perl\site\lib 這樣以後寫程式就不用特別指定路徑,只需use Genesis; 即可
7. 程式的開頭如下
   use Genesis;
   $f = new Genesis; 程式後面就看你要寫什麼了...........我在HPUX寫的程式直接拿來windows2000跑也ok!
8  若未再開頭指定perl的路徑,要執行程式可以寫這樣寫..........
   假設主程式名稱為Asics.pl
   另外寫一個呼叫Asics.pl的小程式,其檔名為: call_asics.sh
   call_asics.sh的內容如下:
   c:/perl/bin/perl.exe c:/test/Asics.pl  #要加一個enter,確定換行
9. 這樣你就可以使用Genesis2000中號稱最強的perl scripts.............
10 perl萬歲萬歲萬萬歲........................................
回复 支持 反对

使用道具 举报

 楼主| 发表于 2004-7-17 16:03:47 | 显示全部楼层

3. h2ph.bat * sys/* 執行時產生下列訊息:

% h2ph.bat * sys/* Can't locate strict.pm in @INC (@INC contains: .) at h2ph.bat line 18. BEGIN failed--compilation aborted at h2ph.bat line 18.

[em06]
回复 支持 反对

使用道具 举报

 楼主| 发表于 2004-7-17 16:16:26 | 显示全部楼层

% h2ph.bat * sys/* Can't locate File/Path.pm in @INC (@INC contains: .) at h2ph.bat line 21. BEGIN failed--compilation aborted at h2ph.bat line 21.

每次執行% h2ph.bat * sys/*時,好像有很多 .pm的檔案有少?無法一次完成..

[em06]
回复 支持 反对

使用道具 举报

 楼主| 发表于 2004-7-17 16:24:10 | 显示全部楼层

版主:可否給我一個簡單的 .pl 程式,讓我試跑,看是否能執行.(因為example.pl老是有問題)謝謝.

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|手机版|PCB设计论坛|EDA论坛|PCB论坛网 ( 沪ICP备05006956号-1 )

GMT+8, 2024-5-14 06:26 , Processed in 0.111370 second(s), 14 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表