in reply to How to send attributes of an object to create an object of another class?
Try
my $SockObj = Communication->new($self->{serveraddr}, $self->{port}); [download]