




|
Tech Tips25
Take a string and a number (n) as standard in separately, and then repeat the string for n times to standard out.
Author: GeeGo|Date: 2010/03/01|Back to Tech Tips
#!/usr/bin/perl -w
my @in; while(chomp($_ = push @in, $_; last if $. >= 2; } print $in[0] x $in[1], "\n"; |