Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Losing Variable through Socket

Status
Not open for further replies.

solaix

MIS
Oct 23, 2002
11
0
0
US
I'm trying to pass a variable that has a period in it through a socket and keep losing the period and anything that follows.

Here is a SCALED DOWN version of my program
$errfile come in from the command line as /home/username/file.dat
When I read $arg on the Client side it contains /home/username/file ( the .dat is missing)

#On Master ( Sending side )
my $errfile = shift;
select(Server);
$| = 1;
print Server "userfile $errfile\n";
my ($servanswer) = <Server>;


#On Client ( Receiving side )
sub userfile
{
$usererr = &quot;ok&quot;;
my $arg = shift || die;
print Client &quot;$arg&quot;;
close (Client);
}
 
Hi solaix,

Just clutching here ...

Full stop, or period, could mark the end of stream for a socket, so try escaping the period, or encoding it as some thing else

Hope that Helps
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top