in reply to Question from socket newbie

You can set $/
$SIG{ALRM} = sub{die "timeout"}; eval{ alarm($timeout); local $/ = "~"; $line_in = <$socket>; alarm(0); };
Now calling <$socket> will only read up to the first ~ character (or EOF).

blokhead

Replies are listed 'Best First'.
Re: Re: Question from socket newbie
by Melly (Chaplain) on Sep 26, 2003 at 16:22 UTC
    Bingo! Many, many thanks....
    Tom Melly, tom@tomandlu.co.uk