Hi Martha,
Although I do not understand exactly what it is that
you want, the following could help ...
#1# $msg =~ s/\/'/igx;
#2# if (($msg=~ /gu1/i) ($msg !~ /gu1[0123456789]+/i))
First remove line #1#.
I guess you did an attempt to remove quotes here, that weren't even there
(you can see if you print $msg).
Then change line #2# to:
if($msg =~ /gu ?1/i)
Then a single space is allowed, if you would like to allow
more whitespace there (any number of tabs or spaces), you could also do
if($msg =~ /gu[ \t]*1/i)
Maybe you should also extend your code to check that there are
any arguments (you assume $ARGV[1] exists).
For obtaining program arguments, I like to use Getopt,
see one of these links:
http://www.cs.mcgill.ca/~abatko/computers/programming/perl/howto/getopts/
http://aplawrence.com/Unix/perlgetopts.html
Hope that helps.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response