perl script to print square of numbers side by side? -
i want print numbers 1 10 , print square of side side. script wrote
for (1..10) { print $_,"\n" }
this printing 1 through 10 want know how square , print side side. have tried using exponential operator don't know how implement , print side side.
as understand question correct, should solve problem
for (1..10) { print $_." ".($_*$_),"\n" }