in reply to Re^5: Prototype for constant items???
in thread Prototype for constant items???
You can't expect to tell the difference between the size of an array (such as '3'), and a plain old number (such as '3').
Again: I can tell the difference between scalar and an array, but just not for constants.
You're still missing the point ... I marked it for you, to make it clearer:
DB<4> sub tst (\[$@]) { print ref $_[0] } DB<5> $a="a";@a=(1..3) DB<6> tst $a SCALAR DB<7> tst @a ARRAY DB<8> tst "a" # <--------- that's the point ! Type of arg 1 to main::tst must be one of [$@] (not constant item) at +(eval 12)[/usr/share/perl/5.10/perl5db.pl:638] line 2, at EOF
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Prototype for constant items???
by SuicideJunkie (Vicar) on Sep 28, 2009 at 13:53 UTC |