Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Processing files in remote machine

by Anonymous Monk
on Jan 10, 2013 at 04:31 UTC ( #1012586=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi perl monks, I have to run a perl script from my local machine to process some files in a remote machine.All the input files should be in remote machine and the script should be in my local machine.Is this possible in Perl?I am just a beginner.If its possible can anyone please tell how to do it.


Replies are listed 'Best First'.
Re: Processing files in remote machine
by vinoth.ree (Monsignor) on Jan 10, 2013 at 05:26 UTC
    What you really want to do with the remote files?

    If you want to Read/write/edit remote files transparently use this module


      but deep in the linked info, "Unix only"
Re: Processing files in remote machine
by Corion (Pope) on Jan 10, 2013 at 13:20 UTC

    You will need to provide far more context than you did.

    As a long shot, I use the following to locally process the contents of a file that is stored encrypted on a machine reachable through ssh:

    ... my $remote_file = "Storage/bar20100722.gz.gpg"; open my $fh, "ssh corion\@storage cat $remote_file | gpg2 --decrypt - +| gunzip -cd |" or die "Couldn't open '$remote_file' "; }; ...
Re: Processing files in remote machine
by salva (Abbot) on Jan 10, 2013 at 09:27 UTC
    What operating systems are the machines running? (Unix, Windows, VMS, etc.)

    What remote access methods are enabled or allowed? (SSH/SFTP/SCP, Telnet, FTP, CIFS, NFS, HTTP, etc.)

      Using the OS windows. SFTP enabled.
        Are you being charged by keystroke or what?

        Come on!, give a good description of your environment and what you want to accomplish if you really want to get any useful help!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1012586]
Approved by Athanasius
erix .oO( that sounds Boyer-Mooreish )
[Corion]: erix: Yes, but that's mostly for skipping characters you'll never read, but this approach skips the problem of needing to load more data while looking at a half-match
[Corion]: I mostly wonder how I can add this "reversal" to my toolchest, and if it's worth it or just clever

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (14)
As of 2016-12-06 15:32 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (108 votes). Check out past polls.