in reply to Re^8: Creating 'new' subroutine.
in thread Creating 'new' subroutine.
sub new { my $class = shift; my $self = ref $_[0] ? $_[0] : { @_ }; return bless $self, $class; }
Grab yourself a copy of the free book Modern Perl a loose description of how experienced and effective Perl 5 programmers work....You can learn this too. , it also explains this
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^10: Creating 'new' subroutine.
by Lennotoecom (Pilgrim) on Oct 11, 2013 at 12:04 UTC |
In Section
Seekers of Perl Wisdom