NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
^5 (Score:1)
Re:^5 (Score:1)
For the ranges, it'll probably seem less strange if I add that $x...^$y means "the range from $x up to but excluding $y" - without the ^ it'd be up to and including $y. You can stick a ^ on either side of the .., or both, though that's not yet implemented. So ^$y is just shorthand for 0..^$y.
So it's actually the ^TypeName case that is the more weird one. The spec (S03) mentions that both get the "domain" of the thing to the right of them in an abstract-y kinda way. Also, ^ is used to mean "meta-class" in other a number of other cases.
It's a tad odd, but I think you'd have to be doing something pretty contrived to get into a situation where it was unclear which you're doing from just looking at the code. And while ranges are something you play with often, I doubt most everyday programmers will be caring about the metaclass so often, if at all.
Hope this helps you understand it, even if not like it. :-)
Jonathan
Reply to This
Parent