If script 2 can be a CGI just send it the values by calling it with the appropriate query string:
# in script 1 use LWP::Simple; my %values = ( foo => 'some val', bar => 'other val' ); my $script2 = 'http://somewhere.com/cgi-bin/script2.pl'; my $query_string = join '&', map { '$_=' . escapeURL($values{$_}) } ke +ys %values; my $res = get( $script2 . '?' . $query_string ); print $res; sub escapeURL { my $encode = shift; return undef unless defined $encode; $encode=~s/([^a-zA-Z0-9_.-])/uc sprintf("%%%02x",ord($1))/eg; return $encode; } # in script 2 use CGI; my $q = new CGI; print $q->header; # prove we got it.... print "<p>Got: $_ " . $q->param($_) for $q->param(); # print stuff to file....
Alternatively use Net::SSH or IO::Socket or shell out to system('ssh', 'user@machine', 'script', 'data' ). There are lotsa ways to do it.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Connecting to a remote host
by tachyon
in thread Connecting to a remote host
by rupesh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |