more useful options | |
PerlMonks |
Re^2: Find and replace MD5 hash from fileby ikegami (Patriarch) |
on Jun 29, 2011 at 19:32 UTC ( [id://912019]=note: print w/replies, xml ) | Need Help?? |
Adding single quotes does not protect from shell interpolation. That will fail if $hash1 or $hash2 can contain «'», I don't think that's possible, but I don't know for sure. That's why I use
instead of
Update: philipbailey has since pointed out that the hash cannot contains quotes. While you can't context text to a shell literal using the second snippet in general, it appears to be safe in this particular circumstance.
In Section
Seekers of Perl Wisdom
|
|