Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: looping logic error while printing output from folder/flie content

by 2teez (Priest)
on Dec 15, 2012 at 02:36 UTC ( #1008924=note: print w/ replies, xml ) Need Help??


in reply to looping logic error while printing output from folder/flie content

"..but problem is everytime it prints first filename and it's folder/basefolder name.."

Reason: Because, the first filename "$filenames[0]" is "hardcore" written in your script i.e &write_output subroutine.
see this

... <connection type="PuTTY" name="$filenames[0]"> <connection_info><name>$filenames[0]</name> ...
The filename is not changing. Likewise are other variables used in your &write_output subroutine.
You are simply just calling your &write_output subroutine, again and again.

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me


Comment on Re: looping logic error while printing output from folder/flie content
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2014-11-01 01:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (227 votes), past polls