On Tue, Aug 28, 2012 at 08:16:01AM +0200, Johan Vromans wrote: > Father Chrysostomos <sprout@cpan.org> writes: > > >> Tempting. If constant subs could be made to work as well, I think it > >> would cover 90% of the uses I'd have for it. > > > > Unfortunately, constant subs would pose the same string/number > > problem. > > This puzzles me... Can you explain? (this may or may not be what FC had in mind): Consider: BEGIN { $x = 1; # print "x=$x\n"; } use constant FOO => $x; ... when(FOO) Depending on how the constant value is is defined, it may be IOK or POK: by uncommenting the print debug, we change FOO from integer to string. -- Nothing ventured, nothing lost.Thread Previous | Thread Next