Re: IO::Socket::INET on OSX or TCP stack problem
- From: "Uri Guttman" <uri@xxxxxxxxxxxxxx>
- Date: Fri, 15 May 2009 08:31:14 -0400
"SG" == Stuart Gall <stuart@xxxxxxxxx> writes:
SG> On 2009-05-10 19:29:47 +0300, Uri Guttman <uri@xxxxxxxxxxxxxxx> said:
SG> So it must be either a perl/osx thing or there must be something odd
SG> about the TCP packets coming from these modbus devices which is
SG> upsetting OSX.
hard to say from here. i highly doubt it is perl. if you want to verify
this do the same thing in c or another language. or google for this
situation and see if others have seen it.
>> why the begin block? declaring empty vars subs in begin blocks does
>> nothing.
SG> It makes them static.
SG> Is there another way to define a static variable ?
just declaring vars outside a sub makes them static. the issue is more
about scoping than compile vs run time which is what BEGIN controls.
SG> sub OpenSocket($) {
>>
>> why are you using prototypes? they are meant for one thing alone
>> (changing how a sub call is parsed). they are not useful for arg
>> checking or stuff.
SG> I am using perl -w - I dont usually, but while I am trying to figure
SG> out why this script does not work I am.
SG> perl -w complains if you don't use prototypes. Or is there some other
SG> way around that ?
huh?? perl doesn't complain if you don't use prototypes. it will complain if
you use wrong prototypes. don't put any () after the sub names. read
perldoc perlsub for more.
uri
--
Uri Guttman ------ uri@xxxxxxxxxxxxxxx -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
.
- References:
- IO::Socket::INET on OSX or TCP stack problem
- From: Stuart Gall
- Re: IO::Socket::INET on OSX or TCP stack problem
- From: derykus
- Re: IO::Socket::INET on OSX or TCP stack problem
- From: Stuart Gall
- Re: IO::Socket::INET on OSX or TCP stack problem
- From: Uri Guttman
- Re: IO::Socket::INET on OSX or TCP stack problem
- From: Stuart Gall
- Re: IO::Socket::INET on OSX or TCP stack problem
- From: Uri Guttman
- Re: IO::Socket::INET on OSX or TCP stack problem
- From: Stuart Gall
- IO::Socket::INET on OSX or TCP stack problem
- Prev by Date: Free Stay In Luxuri Hotel For 1 Month With Visa and Ticket
- Next by Date: Re: comma operator
- Previous by thread: Re: IO::Socket::INET on OSX or TCP stack problem
- Next by thread: Re: IO::Socket::INET on OSX or TCP stack problem
- Index(es):
Relevant Pages
|