Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Strange behavior of @- and @+ in perl5.10 regexps

by demerphq (Chancellor)
on Sep 13, 2009 at 12:40 UTC ( #794985=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use v5.10;
    
    ...
      say "At the very end:\n\@- = (@-)\t ".scalar(@-)." items\n\@+ = (@+)
    +\t ".scalar(@+)." items\n";
    }
    __END__
    
  2. or download this
    Compiling REx "%n    (?{%n         say %"before:\n\@- = (@-)\t\t %".sc
    +alar("...
    synthetic stclass "ANYOF[\0-\11\13-\377][{unicode_all}]".
    ...
      43:   TAIL (44)
      44: END (0)
    floating ""$ at 2..2147483647 (checking floating) stclass ANYOF[\0-\11
    +\13-\377][{unicode_all}] minlen 2 with eval 
    
  3. or download this
    before:
    @- = (0)         1 items
    ...
    At the very end:
    @- = (0, 0, 2)     3 items
    @+ = (4, 2, 4, , , )     6 items
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://794985]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2014-07-25 12:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (171 votes), past polls