John W. Krahn said:

> Harry Putnam wrote:
>>
>>  ./example2.pl  -s '(some)(.*$)' '$1one'
>                                     ^^^^^
> That won't work because it be interpreted as the variable $1one instead
> of the variable $1 followed by the string 'one'.  You need to put parens
> around the variable name like this:
>
> ./example2.pl  -s '(some)(.*$)' '${1}one'

Actually, you don't.  The reason being that (your) variables are not
allowed to start with a number.  However, putting the braces there does no
harm.  You can argue amongst yourselves concerning the legibility or
otherwise of the different constructs ;-)

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to