Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Use of a global scalar

by betterworld (Curate)
on Sep 03, 2006 at 02:31 UTC ( #570902=note: print w/replies, xml ) Need Help??

in reply to Use of a global scalar

our $text =~ s/$data[0]/$data[2]/g;
You should note that $data[0] is interpreted as a regular expression, which is probably not what you want. This common error is often the cause of vulnerabilities. See "DON'T" in perlcheat and "\Q" in perlre.

Replies are listed 'Best First'.
Re^2: Use of a global scalar
by Grey Fox (Chaplain) on Sep 03, 2006 at 05:28 UTC
    Thank you much;
    It took me a little while to figure out that the regex was using the address instead of the value. I knew it wasn't working but didn't know why. Now I know where to look.
    Thanks, again.

    -- Grey Fox
    Perl - Hours to learn lifetime to master.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://570902]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2022-12-01 13:50 GMT
Find Nodes?
    Voting Booth?