in reply to Can we do without auxiliary variable here?
Could someone explain where these matches come from?
Calling your second version with prefix_print('y'), I get "PyP", not "PyPP". I am testing with perl 5.12.2, default compile from source on linux.
The match returns two matches on my system:
It would be an infinite loop (forever matching nothing at the end of the line) except for Repeated Patterns Matching a Zero length Substring
I can't imagine how you got "PyPP"
|
|---|