Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Re: Re: Re: network socket send loop is very cpu intensive

by AcidHawk (Vicar)
on Nov 18, 2003 at 17:37 UTC ( #308050=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: network socket send loop is very cpu intensive
in thread network socket send loop is very cpu intensive

Well, I'm not sure about the conventions but I have gotten used to returning 1 for success or 0 for fail. That way I can easily do something like..

if(&mysubroutine()) { ... #continue as mysubroutine was successful } else { ... Something in mysubroutine failed } sub mysubroutine() { my $rc = 0; #this is returned if $rc is not modified which indicates a failure +... #as a silly example we will open a file if (open FH, "<./test.txt") { ... #read in file as the open was successful $rc = 1; } return($rc); }

-----
Of all the things I've lost in my life, its my mind I miss the most.
  • Comment on Re: Re: Re: Re: Re: network socket send loop is very cpu intensive
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://308050]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2021-02-27 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?