Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: subroutine help

by CountZero (Bishop)
on Nov 29, 2012 at 07:16 UTC ( #1006177=note: print w/replies, xml ) Need Help??

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).


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 (Bishop) 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.
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006177]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2018-03-20 02:44 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (247 votes). Check out past polls.