in reply to RE: Re: Stripping characters from strings
in thread Stripping characters from strings

With an anchor that isn't within an alteration, "g" is pretty useless. I'm not near a perl with Debugging turned on so I can't tell you if it's a no-op, but I do know it isn't a dangerous thing to have on there, just useless. =)

Update... And what merlyn said below. (yeesh $*)

--
$you = new YOU;
honk() if $you->love(perl)

  • Comment on RE: RE: Re: Stripping characters from strings

Replies are listed 'Best First'.
RE: RE: RE: Re: Stripping characters from strings
by merlyn (Sage) on Oct 30, 2000 at 05:54 UTC
    Actually, if $* is 1, then $ matches any embedded newline as well as the end of the string, so s/.$//g; actually makes sense!

    I doubt that was the case here, though. {grin}

    -- Randal L. Schwartz, Perl hacker