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); }
In reply to Re: Re: Re: Re: Re: network socket send loop is very cpu intensive
by AcidHawk
in thread network socket send loop is very cpu intensive
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |