Consider:
#! /usr/bin/perl
@no = (1 .. 20000);
foreach(@no) {
print "<div id=\"world@no\" onclick=\"javascript:showDiv_postscreen(); javascript:hideDiv_welcomebuttons()\"> </div>\n";
}
This is my Perl script, but how do I get it to rewrite the sentence with a new variable each time?
I.e., how do I get it to output the following?
<div id="world1" onclick="javascript:showDiv_postscreen(); javascript:hideDiv_welcomebuttons()"> </div>
.
.
.
<div id="world20000" onclick="javascript:showDiv_postscreen(); javascript:hideDiv_welcomebuttons()"> </div>