http://qs321.pair.com?node_id=52014

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to use a constructor to create an object and it doesn't appear to be working properly.
#main code use Send; $name="lastname"; $obj=Send->new($name); $user=$obj->{user}; $session=$obj->{session}; print "the: $user,$session"; #package Send package Send; sub new { my ($user)=@_; my $self={}; $self->{user}="$user"; $self->{session}="4556"; bless($self); return $self; } #output is below the: Send,4556
Why isn't the code outputting

the: lastname,4556.

Thanks