in reply to Re^5: Composing regex's dynamically
in thread Composing regex's dynamically

I read that sentence, but didn't take-away the same thing.

But a string containing the same characters would not have the same meaning! ... Hmm, playing around a little, I see: "a string" value is not the same as a string literal. Once it's in a string, the backslashes in particular are already understood.

So, assuming the line in the docs is not written with the precision of an ISO standard, the intent is that the stringified regexp should contain whatever is necessary to reproduce the same meaning if compiled again?

Replies are listed 'Best First'.
Re^7: Composing regex's dynamically
by Corion (Patriarch) on Apr 28, 2011 at 08:17 UTC

    You can print out a regex:

    my $re = qr/foo/; print "$re";

    The stringified regex can be readily used as a regular expression again.

      That's what I'm seeing.