QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 958|回复: 2

perl 问题

[复制链接]
发表于 2004-4-24 02:22:23 | 显示全部楼层 |阅读模式
[datou@bing pl]$ cat test2.pl
#!/usr/bin/perl
printf "请问您尊姓大名?";
$name=;
chop($name);
printf "你好,$name,欢迎光临网上教室!\n";
[datou@bing pl]$ perl test2.pl
syntax error at test2.pl line 3, near "=;"
Execution of test2.pl aborted due to compilation errors.
[datou@bing pl]$ chmod +x test2.pl
[datou@bing pl]$ ./test2.pl
syntax error at ./test2.pl line 3, near "=;"
Execution of ./test2.pl aborted due to compilation errors.
[datou@bing pl]$
发表于 2004-4-25 20:34:25 | 显示全部楼层
我的也是这个问题
回复

使用道具 举报

发表于 2004-4-25 21:15:31 | 显示全部楼层
[code:1]#!/usr/bin/perl
printf "请问您尊姓大名?";
$name=<STDIN>;
chop($name);
printf "你好,$name,欢迎光临网上教室!\n"; [/code:1]
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-9-28 01:16 , Processed in 0.043576 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

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