Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!clyde.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!samsung!dali.cs.montana.edu!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!mips!sysadmin!bjorn From: bjorn@sysadmin.sysadmin.com (Bjorn Satdeva) Newsgroups: comp.lang.perl Subject: untainting data Message-ID: <18@sysadmin.sysadmin.com> Date: 15 Feb 91 00:58:53 GMT Organization: /sys/admin, inc., San Jose CA Lines: 29 I have a problem with untainting data. Larry examples in the manual and book is not sufficient, as I need all alfa-numeric plus the '-'. Currently the code looks like this (which seems to lack somewhat in generality :-): ------------ $ARGV[ 0 ] =~ /^(\w+)*$/; $Addr = $1; # The above does not work for '-' -- sigh if ( $ARGV[ 0 ] eq 'sysadm-list' ) { $Addr = 'sysadm-list'; } ----------- Any attempt on my behalf to change the regular expression to include the '-' only breaks it (showing that my understanding of of the regular expression is still somewhat lacking :-( ). What am I missing?? Bjorn -- Bjorn Satdeva -- email: bjorn@sysadmin.com or uunet!sysadmin!bjorn /sys/admin, inc. The Unix System Management Experts (408) 241 3111 Send requests to the SysAdmin mailing list to sysadm-list-request@sysadmin.com