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
In reply to Re^9: Creating 'new' subroutine.
by Anonymous Monk
in thread Creating 'new' subroutine.
by nitin.sh1982
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |