http://qs321.pair.com?node_id=250249


in reply to Re: •Re: mmv-like hack in perl?
in thread mmv-like hack in perl?

$new = $old; $new =~ s/$pattern/qq{$replace}/eeg;
But you're scaring me here. I said that the string had to be from a trusted source. As soon as you start talking "GUI", that makes me think that the user-ID of the person typing the string is not necessarily the user-ID of the person running the code.

Let me reemphasize. Using this code as-is will allow any arbitrary Perl code to be executed, including shelling out to execute arbitrary system commands. Clear? It's not just about mangling a string. You must either trust the invoker, or not use this code.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re: •Re: Re: •Re: mmv-like hack in perl?
by mpd (Monk) on Apr 14, 2003 at 16:08 UTC
    Perfectly clear. That's what I want to do, because this is just a toy for me to play with. I don't plan on releasing this piece of my junky code. I will likely end up parsing it myself as Aristotle suggests below. If something clever comes out, I will post that bit of code, of course.

    Thanks again.