Ok - I got it finally. I've used the use strict; in my progs. You're right. it helps to identify loosely hanging vars that'll get ya.
Thanks, I'm getting a hang of it slowly, frustratingly but surely. I'm just touching onto this perl class object thing but it seems pretty interesting. I'm trying to translate my java objects to perl object. Learning the syntax of java is pretty tough ;) Just a little humor, speaking perl is like jive talk, I guess, people who speak English cannot understand it ;) Again, thanks for everyone help. -rkl > On Tuesday, September 30, 2003, at 08:44 PM, [EMAIL PROTECTED] wrote: > >> OK version x.3 >> Please just change these lines to make it work. The calling program >> test.pl fails on the assignment line: > > Will do, but I'm not 100% sure you're listening to the suggestions we > give. > >> Bareword "fname" not allowed while "strict subs" in use at utest line >> 8. >> Bareword "lname" not allowed while "strict subs" in use at utest line >> 9. >> Bareword "fname" not allowed while "strict subs" in use at utest line >> 12. >> Execution of test.pl aborted due to compilation errors. > > Nice to see the errors. I see you already figured them out though. > >> test.pl >> ------- >> #!/usr/bin/perl >> >> use strict; > > use warnings; > >> use UserInfo; > > my $user = UserInfo->new(f_name => 'bob', l_name => 'Bingham'); > >> #change name > > $user->f_name('robert'); > > print $user->full_name(), "\n"; > >> UserInfo.pm >> ----------- >> #!/usr/bin/perl >> package UserInfo; >> >> use strict; > > use warnings; > >> sub new >> { my $class = shift; > > my $self = { f_name => 'bob', l_name => 'Bingham', @_ }; > >> return bless $self, $class; >> } >> >> sub full_name >> { my $self = shift; > > return $self->{f_name} . ' ' . $self->{l_name}; > >> } > > sub f_name { > my $self = shift; > $self->{f_name} = shift if @_; > return $self->{f_name}; > } > > sub l_name { > my $self = shift; > $self->{l_name} = shift if @_; > return $self->{l_name}; > } > >> 1; > > Good luck. > > James > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]