in reply to Re: Why does this only work correctly as root?
in thread Why does this only work correctly as root?

my $f; Opendir($f,"."); my $filename; while ($filename=readdir($f)) { if ($filename=~/\.avi$/) { $filename=~s/([ \[\];$'"()])/\\$1/g; #adds \ before spaces, bracke +ts and other special chars ... } }

Note I do not know how escaping works in windows (where \ is dir separator) or what special chars make problems there. So above probably needs some more refinement to work on both platforms.