On Wed, Mar 24, 2004 at 11:08:26AM -0800, John Christian wrote:
> Wait scratch that ... its the read:
>
> while(defined(<$sock>)) { print; }
>
> Where the hanging block is happening.
> And I'm still at a loss as to how to remedy this ...
You've probably long since solved this. The while() loop you're using
has an error. $_ isn't set when you use defined(<$sock>). For
example:
1) poerbook:~% perl -wle 'while (defined(<STDIN>)) { print }'
test
Use of uninitialized value in print at -e line 1, <STDIN> line 1.
ting
Use of uninitialized value in print at -e line 1, <STDIN> line 2.
^C
1) poerbook:~%
Removing the defined() fixes it:
1) poerbook:~% perl -wle 'while (<STDIN>) { print }'
test
test
ting
ting
0
0
^C
1) poerbook:~%
>From the sound of it, you may also want to turn on warnings.
-- Rocco Caputo