找回密码
 注册
查看: 1771|回复: 4

linux命令行(终端)下如何运行perl程序?

[复制链接]
发表于 2003-4-12 00:25:34 | 显示全部楼层 |阅读模式
如题,应当怎样输入命令?
只能 $perl filename.pl  吗?
发表于 2003-4-12 03:29:07 | 显示全部楼层
so what else way u prefer?
回复

使用道具 举报

发表于 2003-4-12 10:06:36 | 显示全部楼层
如果是你保存的名字是*.pl
就用chmod +x  或 chmod u+x 后跟文件名。
回复

使用道具 举报

 楼主| 发表于 2003-4-12 22:17:46 | 显示全部楼层
呵呵,知道了。
先chmod xxxxx 修改权限,然后./filename.pl 就可以运行了
回复

使用道具 举报

发表于 2003-4-13 00:24:27 | 显示全部楼层
but u need make sure that u first line of per file is this:
"#!/usr/bin/perl"
this can tell the shell using which program to execute u script. otherwise u have to run 'perl xx.pl'
回复

使用道具 举报

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

本版积分规则

GMT+8, 2025-2-25 14:20 , Processed in 0.087578 second(s), 15 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

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