Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: remote directory structure

by abaxaba (Hermit)
on Mar 06, 2002 at 04:11 UTC ( [id://149611]=note: print w/replies, xml ) Need Help??


in reply to remote directory structure

Couple of different options: Expect.pm, with a raw telnet into the box. Not real secure for the remote user, IMHO.

OR

Write a cgi for the remote box that basically does this:
print "Content-type:text/html\n\n"; opendir (D,".") || die "$!"; print join ("\n",(sort {$a cmp $b} grep !/^\.\.?$|$0/, readdir D)); close(D);
Put the CGI on the remote machine, and just parse the HTTP response into an array to get the dirlisting. If this needs to be recursive on the remote machine, checkout File::Find.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-18 00:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found