Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^3: Printing an array using while loop

by Not_a_Number (Prior)
on Oct 22, 2007 at 19:28 UTC ( #646555=note: print w/replies, xml ) Need Help??

in reply to Re^2: Printing an array using while loop
in thread Printing an array using while loop

Well it made me laugh, especially as the "spirit of the OP's question" is obviously homework. :)
  • Comment on Re^3: Printing an array using while loop

Replies are listed 'Best First'.
Re^4: Printing an array using while loop
by Anonymous Monk on Oct 23, 2007 at 15:38 UTC

    (drifting off-topic...)

    It was actually useful for me, even though it's not a homework assignment :)

    I wanted to send the results to a file (not a problem), but this syntax caused a space to be inserted at the beginning of the second and subsequent lines. I'm already generating the array elements with a terminating newline, so I had to use:

    print FILE join( "", @array );

    To get what I wanted.

    Thanks though, for helping me to think outside of the looping concept.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://646555]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2019-08-25 06:42 GMT
Find Nodes?
    Voting Booth?

    No recent polls found