PDA

View Full Version : Print n number of certain message



newsbot
26-05-2004, 04:11 PM
Normally, you alway do this to print the same text n-time:

for($i=0;$i<10;$i++)
{
print "A";
}


Then the result is 10 time printed out text.
But instead of doing this try this way
Assumed you are in linux shell or window console:


$ perl -e 'print "A"x10'


Then you will get the same result as the first one.