Re: about perl question!
please get a perl book, and read it, then ask questions.
_all_ your questions are answered in any (good ;)) perl book
in a _better_ way then i could give. ;)
good luck!
btw, yeah, perl, right! ;)
> ÇëÎÊmy $a=new('red',1,2)#Õâ¾äÊÇʲôÒâ˼ÄØ£¿
> »¹ÓУº
> clock.pm
> package clock;
> sub new{my($type)=@_;
> my $self={};
> ΪʲôҪ¶¨Òå¸öÕâ¸ö¶øÇÒÊÇ¿ÕµÄÄØ£¿
> $self->{time}=time();
> bless $self,$type;
> #ÇëÎÊblessÊÇʲôÒâ˼ÄØ£¿
> }
> sub get{my($self)=@_;
> return($self->{time});
> }
> clock.pl
> use clock;
> my $clock1=new clock();Õâ¾äÊÇʲôÒâ˼ÄØ£¿
> print"$clock1->get();Õâ¾äÄØ£¿
Reply to: