学完了整本教程,也无从觅得从键盘输入多行文字的结束符,
终得其解:ctrl + z
oh,my god..
#!/usr/local/bin/perl
print "Enter several lines:\n";
@text = <STDIN>;
print "Which line do you want to display? ";
$n = <STDIN>;
print $text[$n-1];
#print $text;
学完了整本教程,也无从觅得从键盘输入多行文字的结束符,
终得其解:ctrl + z
oh,my god..
#!/usr/local/bin/perl
print "Enter several lines:\n";
@text = <STDIN>;
print "Which line do you want to display? ";
$n = <STDIN>;
print $text[$n-1];
#print $text;