Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://308050]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 13:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found