sub edit { $file = $q->param('select'); foreach $line (@edittypes) { if ($file !~ /$line/) { &inerror("You can only edit @edittypes"); } } }