If you only want to place parens around the input, then you can just place it parans like: $ARGV[0] = '(' . $ARGV[0] . ')';
In your original code, you want to work with $ARGV[0] but the regex w/o inputs assumes: $_ =~ s/$ARGV[0]/\($ARGV[0]\)/g; which is not what you are after. If you really want the regex then: $ARGV[0] =~ s/$ARGV[0]/\($ARGV[0]\)/g; would work for you. Wags ;) -----Original Message----- From: Martin Karlsson [mailto:[EMAIL PROTECTED]] Sent: Sunday, November 04, 2001 03:54 To: [EMAIL PROTECTED] Subject: regexp with $ARGV Could anyone please show me the way to think here? If I execute a script with an argument, e.g monkey, then monkey will be found in $ARGV[0]. If I then want to highlight the word monkey by putting it in parentheses, i thought something like s/$ARGV[0]/\($ARGV[0]\)/g would do the trick; however it won't. Thanks, -- ------------------------------------------------ Martin Karlsson [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]