我想讀取套接字並對它們執行「getline」。
my @socket1;
$socket1[0] = IO::Socket::INET->new(
Type => SOCK_STREAM,
PeerAddr => "127.0.0.1",
Proto => "tcp",
PeerPort => $dbase_param{camera_stream}
) or die "Cannot open socket on port " . $dbase_param{camera_stream} . ".\n";
print { $socket1[0] } "\n";
my $ligne = <$socket1[0]>;
while (!($ligne =~ /Content-Length:/)) {
$ligne = <$socket1[0]>;
}
它會告訴我Use of uninitialized value $ligne in pattern match (m//)
第二$ligne = <$socket1[0]>;
我不明白WY