Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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

Comment on Re: subroutine help
Select or Download Code
Re^2: subroutine help
by choroba (Abbot) 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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2014-12-29 10:00 GMT
Find Nodes?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?

    Results (185 votes), past polls