Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Thanks. Not that I like this behavior but I think I'll have to live with it.
But if we are at it. My problem is that I have a function that returns two values when data is available to it and when no data remained it returns undef. What I would like to do is to call this function in a while until all data is consumed. I tried to do this first by which failed due to the above reasons (i.e., the while block always executed since ($x, $y) = recv_data always evaluates to true even if the function returns undef). I still have the option to write but I fail to see this as elegant. How to organize this code so that I obtain the required behavior in an elegant and readable way? In reply to Re^2: Can't understand function returning undefs
by rg0now
|
|