#!/usr/bin/perl -w # # Listing 7. # Filter.pl # $command=shift; unless ($command=~ /^([-\w.\s\/\\\|]+)$/) { print "Security error.\n"; exit (1); }