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" } 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -