die "Cannot read the buffer. $!" unless defined $n;
Although I don't run "Good Vibes Radio", nor have any experience with it, I wouldn't use "die" on an error, since you're in a sub. I'd rather return the error message and if none, the number of listeners. If you'd use this sub routine in some script to generate some HTML, the user would at least get a somewhat decent error. (if of course you do something usefull with the returned error ;))
Just my €0.02
In reply to Re: A sub to return the number of listeners on a Shoutcast server
by b10m
in thread A sub to return the number of listeners on a Shoutcast server
by Omeron
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |