my $filename= $param =~ m#^(\w[-.\w]*)\z# or die "Invalid file name ($param).\n";