New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
g-Option with m// in a loop #993
Comments
From pstadt@stud.fh-heilbronn.deI tried this with perl, version 5.005_03 built for i586-linux-thread --8<------------------------------------------------------- $v1="../test"; print "-- without global " . "-" x 30 ."\n"; print "-- with global " . "-" x 33 ."\n"; print "-- with global and redefined var " . "-" x 15 ."\n"; --8<--------------------------------------------------------- I expected all three loops the same output, but there wasn't. If it is a "feature" please add it to perltrap. BYtE Oli \ / ASCII Ribbon Campaign - Say NO to HTML in email and news |
From @tamiasOn Mon, Dec 27, 1999 at 07:01:11PM +0100, Oliver Paukstadt wrote:
The behavior you are seeing is *exactly* as documented. I do not perlop: In scalar context, each execution of m//g finds pos() is not reset after a successful match with /g. pos() is reset after If you don't want the effects of /g, don't use /g! Ronald |
Migrated from rt.perl.org#1943 (status was 'resolved')
Searchable as RT1943$
The text was updated successfully, but these errors were encountered: