> $command =~ s/\-x//  should work

Note - the dash only needs to be escaped when its in a position to 
possibly denote a char range, so:
s/-z//;
and:
s/a-z//;
s/0-9//;

are okay, and:
s/[a-z]//;

does what you expect (removes first lower case letter). Sneaks up on you, 
though, in:
s/[&[EMAIL PROTECTED]//;

Thinking that's the 5 chars to remove, its actually 3 and then all the 
chars (ascii-ish) between '#' to '@' inclusive.  You can do:
s/[-&[EMAIL PROTECTED]//;

and the dash is just a dash again.

I  missed the first part of this, but you may want a /g there to get all 
your '-x' instances.

a

Andy Bach, Sys. Mangler
Internet: [EMAIL PROTECTED] 
VOICE: (608) 261-5738  FAX 264-5932

"If there be time to expose through discussion the falsehood and 
fallacies, to avert the evil
by the process of education, the remedy to be applied is more speech, not 
enforced silence." 
   Justice Louis Brandeis

_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to