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

Re: Your favourite gory detail...

by japhy (Canon)
on Jun 27, 2004 at 03:46 UTC ( #369912=note: print w/replies, xml ) Need Help??


in reply to Your favourite gory detail...

This is one of my unfavorite details. An lvalue-d sub doesn't work quite right with a regex:
{ my $s; sub str :lvalue { $s } } str = "japhy"; pos(str) = 2; print pos(str); # prints 2! str =~ /\G(.)/ and print $1; # prints 'j', not 'p' print pos(str); # prints 2!
Maybe I should perlbug this...
_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2021-10-27 23:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (95 votes). Check out past polls.

    Notices?