Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • re (Score:2, Interesting)

    Allow the syntax my($_) so it creates a brand new lexical variable $_. (local($_) doesn't create a new lexical variable, since it only lexicalises the value, but doesn't remove the magic from the previous $_.)

    Do operators that default to $_ then use $::_ or the new lexical $_?

    Will it also be possible to have lexical $/, STDIN, ARGV and $<? How do they work?

    While we're at it, allow the syntax readpipe PROGRAM LIST, similar to system PROGRAM LIST, to prevent shell interpolation.

    Please also allo

    • Lexical $_ : the real goal is to have the built-ins take the lexical $_ if there's any currently in scope. (It's trivial to permit the syntax "my $_" but it's useless if the interpreter doesn't catch up.)

      I don't see how a lexical $/ etc. would be useful. The purpose of a lexical $_ is precisely to ensure that $_ is a plain, regular scalar, keeping it away from the influences of outer scopes. Surely you don't want to remove magic from $/.

      The readpipe LIST syntax was, of course, implied in my terse notes.