and within the subroutine:if (&readfromsocket(*new_sock)){ do some stuff}
sub readfromsocket{ local $socketname = shift; if (defined($lineread = <$socketname>)) {do some stuff} }
In reply to globbing,file handles and subroutines by drake50
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |