in reply to Function overloading in perl
Note that the very things that I would use to define overloading are not avalible. The same thing goes for lists.my $a = 1; print OVERLOADED; sub OVERLOADED{ #This sub wants a char array return (shift eq "one"?1:0); } sub OVERLOADED{ #This sub is illegal in Perl #This sub wants an int return (shift == 1?1:0); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Function overloading in perl
by Anonymous Monk on Sep 07, 2010 at 22:17 UTC |