in reply to Question from socket newbie
Now calling <$socket> will only read up to the first ~ character (or EOF).$SIG{ALRM} = sub{die "timeout"}; eval{ alarm($timeout); local $/ = "~"; $line_in = <$socket>; alarm(0); };
blokhead
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Question from socket newbie
by Melly (Chaplain) on Sep 26, 2003 at 16:22 UTC |