Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: remote directory structure

by abaxaba (Hermit)
on Mar 06, 2002 at 04:11 UTC ( #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
Node Status?
node history
Node Type: note [id://149611]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2020-02-28 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (123 votes). Check out past polls.

    Notices?