$count = 5;
$ss = "12345";
print "$ss\n" x $count;
print "--------------------------\n";
print "Pls input a string: ";
$ss = <STDIN>;
print "Pls the count of string to display: ";
$count = <STDIN>;
print "$ss\n" x $count;
print "--------------------------\n";
while (1) {
print "Pls input a string: ";
$ss = <STDIN>;
if ($ss == "\n") {
print "exit";
last;
}
print "Pls the count of string to display: ";
while ($count = <STDIN>) {
if ($count != "\n") {
last;
}
print "Pls the count of string to display: ";
}
print "$ss\n" x $count;
print "--------------------------\n";
}
Another Perl Practice(ActivePerl On Window Platform)
最新推荐文章于 2016-12-14 17:27:55 发布