my regex flaw exposes another?

Kezdőlap
Csatolmányok:
Üzenet email-ben
+ (text/plain)
Üzenet törlése
Válasz az üzenetre
Szerző: Mike
Dátum:  
Tárgy: my regex flaw exposes another?
I'm in the process of putting a little CGI script
(on it's way David:-) and below is a little snippet
of the code. I know I'm bad at regex, I was trying to exclude
both the ".", "..", and a directory called "approved".

Clicking on the link for the ".." directory pops up
a nice little window with my entire Perl script in plain text!

foreach $file (@userfiles) {
next if ($file =~ /(^\.)(approved)/);
print "<a href=\"javascript:openWin('/moliaps/$user/$file')\;\">\n";
print "<image alt=\"Thumbnail for $file\" src=\"/moliaps/$user/$file\" width=\"50\" height=\"65\"></a><br>\n",
textfield('notes'),br;
}

Is there something else I need to begin paying attention to
so that this will not accidently happen again?