http://www.perlmonks.org?node_id=1006177


in reply to subroutine help

When you print an array, like print @array; then all elements of the array are printed next to each other without any separation.

On the other hand if you print the array like print "@array"; then the array is first interpolated, i.e. the elements are joined by whatever is in $" (usually a space).

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

Replies are listed 'Best First'.
Re^2: subroutine help
by choroba (Cardinal) on Nov 29, 2012 at 09:28 UTC
    without any separation
    Well, the members of the list are separated by $, which is empty by default.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ