$
$_
Hello,
Would someone please help me with this 'dereferencing' problem?
I've searched this group for solutions posted previously and
did find three threads that kept me busy trying differnt things;
but this unfortunatly didnt solve my problem. This seems like
it will require dereferencing an object that references another
object in another package.
Please reply if you have any helpful information that may solve
this problem.
Here is the example code (the screen output is in comments):
#!
use strict;
use warnings;
use IO::Socket;
use IO::LineBufferedSet;
use Fcntl qwDEFAULT :flock);
#Declarations#
my ($listen_socket, $session_set,);
#Main#
$listen_socket = IO::Socket::INET->new(LocalPort => 11111,
Timeout => 32,
Listen => 64,
Reuse => 1,
Proto => 'tcp',);
if ($listen_socket) {
$session_set = IO::LineBufferedSet->new($listen_socket);
}else{
die "\aCan't create a listening socket\n$@";
}
#Mainloop#
while (1) {
my @ready = $session_set->wait;
my @sessions = $session_set->sessions();
print "$sessions[0]\n";
#This is the output from the above command:
#IO::LineBufferedSessionData=HASH(0x1c6b06c)
}
Would someone please help me with this 'dereferencing' problem?
I've searched this group for solutions posted previously and
did find three threads that kept me busy trying differnt things;
but this unfortunatly didnt solve my problem. This seems like
it will require dereferencing an object that references another
object in another package.
Please reply if you have any helpful information that may solve
this problem.
Here is the example code (the screen output is in comments):
#!
use strict;
use warnings;
use IO::Socket;
use IO::LineBufferedSet;
use Fcntl qwDEFAULT :flock);
#Declarations#
my ($listen_socket, $session_set,);
#Main#
$listen_socket = IO::Socket::INET->new(LocalPort => 11111,
Timeout => 32,
Listen => 64,
Reuse => 1,
Proto => 'tcp',);
if ($listen_socket) {
$session_set = IO::LineBufferedSet->new($listen_socket);
}else{
die "\aCan't create a listening socket\n$@";
}
#Mainloop#
while (1) {
my @ready = $session_set->wait;
my @sessions = $session_set->sessions();
print "$sessions[0]\n";
#This is the output from the above command:
#IO::LineBufferedSessionData=HASH(0x1c6b06c)
}