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.
In Section
Seekers of Perl Wisdom