Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Printing while receiving files from socket

by ton (Friar)
on Oct 31, 2001 at 01:06 UTC ( [id://122199]=note: print w/replies, xml ) Need Help??


in reply to Printing while receiving files from socket

Don't know why you get nothing when you print outside the loop, but I can answer why you get repeating values within.

With each iteration, you are pushing the newest file to the @files array, then printing out the contents of the entire array. So on the first iteration, you print out the first file, on the second you print out both the first and the second files, on the third you print out all three files, etc. Just print out $receivefile to get no repeats in your output.
-----
Be bloody, bold, and resolute; laugh to scorn
The power of man...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-03-29 04:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found