in reply to Re: Updating files over multiple servers
in thread Updating files over multiple servers

Ok, but how do I connect TO the other servers?

right now I update .txt files like this:
open(FI,">>/home/path/to/file.txt") or die "Oops file failed: $!"; seek(FI, 0, 2); print FI "username /specific/path /something else\n"; close(FI);
So if I have to duplicate everything to the other servers so that no matter which server the load balancer puts the users on, they have that data available to them, how do I use Perl to Open those files, since they are not on the same server.

Thanks.
Richard
Sorry for the confusion in the first question.

Replies are listed 'Best First'.
Re^3: Updating files over multiple servers
by regexes (Hermit) on Sep 27, 2007 at 07:03 UTC
    Hello,

    For most of my machines, I simply connect with telnet, i.e. on Unix/Linux machines. Note that I'm in an internal network, so I'm not confronted with many security issues. It all depends on your network, so YMMV.

    There is a perl Telnet module. You can find the documentation here: Net::Telnet. Connect to each machine, open the file, concatenate, close file. The telnet service on Windows is somewhat more difficult. It's also mentioned in the documentation.

    Also, if you search PerlMonks, you're sure to find examples.

    regexes


    -------------------------
    Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan "press on" has solved and always will solve the problems of the human race.
    -- Calvin Coolidge, 30th President of the USA.