debugging - Why does Perl's quotemeta() function behave differently when under the debugger? -
I have been bitten by this small inconsistent debugger behavior. perl -d
$ perl -e 'under the print quotemeta ("/ a
quotemeta ()
function behaves differently /
The output is \ / a \ / b / c
, which is correct and as such copy-F comma
. < / P>
Now, when under the debugger, the output becomes \\ / a \\ / b \\ / c
. I thought that I'm using some core modules, Although the task was redefined in the form of a test, it seems that behavior happens when D CORE :: quotemeta ()
gives the same output.
Can anyone illuminate me?
Thank you! < / P>
quotemeta is a shotgun, to avoid all non-word characters For whether they require it or not, debugger is less heavy; cites those words for which it is needed (backslash, do not slash forwards.) More importantly, when you use the original When you print them, then compare them:
DB < 1 & gt; X colometa ('a / b / c') 0 'a \ \ / b \\ / c' db & lt; 2 & gt; P quoted ('a / b / c') a \ / b / c
Comments
Post a Comment