Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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
Replies are listed 'Best First'.
Re^2: subroutine help
by choroba (Canon) 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 rifling through the Monastery: (6)
As of 2015-10-10 05:47 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (254 votes), past polls