Connie Chan wrote: > > > > From: Connie Chan [mailto:[EMAIL PROTECTED]] > > > > > > Say, I have an input $x = "ABCDEF"; > > > and I will try to remove $x from a string, > > > what can I do ? > > > > > > Is there something like : > > > > > > $x =~ s/$x//g; > > Sorry everybody.... I've make a mistake on forgetting to add a > /i operator... my problem happens just becasue of case not match....
You might need the /o option if the variable doesn't change or a better option is to use the qr// operator. my $x = qr/ABCDEF/i; $string =~ s/$x//g; You also might need quotemeta if there are any meta characters in your variable. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]