LOL, thx guys
![[Linked Image]](https://ubbdev.com/ubb/smilies/smile.gif)
To keep up with tradition though, andy...you're about 99% of the way correct with:
die 'Bad characters in file name.' unless($file_name =~ /^[A-Za-z0-9]$/);
however ya made one BIIIIIG blunder. That regex only allows for a one character filename
![[Linked Image]](https://ubbdev.com/ubb/smilies/smile.gif)
and a smaller blunder... it doesn't allow for '.', _ and - which are perfectly valid in filenames.
I would use full on taint checking:
die 'Bad characters in file name.' unless $file_name =~ /^([w.-]+)$/;
$file_name = $1;
--mark
This message has been edited by Mark Badolato on November 26, 2000 at 07:53 PM