Sorry, not RHL-5.8.0, perl-5.8.0 is the culprit!

-----Original Message-----
From: TN [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 06, 2003 9:11 AM
To: 'fark'; [EMAIL PROTECTED]
Subject: RE: odd perl & linux socket query problem.....


What version of Linux are you running?  Sounds like the RHL-5.8.0
"UTF-8-ification" of filehandles issue that came up last week in this
mail list and is described at
http://search.cpan.org/src/JHI/perl-5.8.1/pod/perldelta.pod

-tristram

-----Original Message-----
From: fark [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 06, 2003 8:54 AM
To: [EMAIL PROTECTED]
Subject: odd perl & linux socket query problem.....


Hiya, not really sure if this should be in beginners or not, but I am a
beginner :).

I'm trying to write a script (or currently using some other stuff to
test) to send a network query out, querying game servers....


#!/usr/bin/perl -w

use Socket;
my $serverip = "194.109.69.91";
my $serverport = 27960;
my $getstatus = "\xFF\xFF\xFF\xFFgetstatus";  //THIS IS THE LINE I'M
HAVING PROBLEMS WITH IN LINUX BEING SENT

$ipaddr = sockaddr_in($serverport, inet_aton($serverip)); $protocol =
getprotobyname("udp");

socket(SOCKET, PF_INET, SOCK_DGRAM, $protocol) or die "socket: $!";
connect(SOCKET, $ipaddr) or die "connect: $!"; send(SOCKET,
"$getstatus\n", 0); recv(SOCKET, $response, 65000,0); print ($response);

The weird thing is this works fine in windows and get a response i want,
and if I packet stuff whats sent out (from $getstatus) the first part is
FF FF FF FF which is fine, problem is under Linux when I run the script
and sniff the packets going out it comes as c3 bf c3 bf c3 bf c3 bf. So
somehow its not converting what I've entered correctly? Must be
something obvious I'm missing?

Is there something odd I'm not realising with the perl installs on Linux
compared to Windoze as the same script acts different.

Any help much appreciated...

tia fark





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 23/09/2003


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to