Well, I wouldn't match "anything" but if you know what the format is roughly going to look like, you could limit it to something like this:
if ($filename =~ m#^[\w.]$#) { print "Ready to process $1...\n"; } else { print "Skipping $1: bad characters detected\n"; ## Log to a file, email someone, raise a ruckus, etc. }
In reply to Re: Untainting 'bad' filenames
by turnstep
in thread Untainting 'bad' filenames
by doran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |