用perl按相反顺序打印从键盘上输入的字符
要求:每行一个读入从键盘上输入的字符,然后再以相反的顺序打印出来。
#! /usr/bin/perl
print "please input characters,and use CTRL-D finish:\n";
chomp(@a=<STDIN>);
@b=reverse @a;
print "@b\n";
#! /usr/bin/perl
print "please input characters,and use CTRL-D finish:\n";
chomp(@a=<STDIN>);
@b=reverse @a;
print "@b\n";
none