Use qq instead of qw to get the variable interpolation.

Eric Winter, SSAI, NASA GSFC Code 662
[EMAIL PROTECTED]
(301) 286-2316 Office: T2, Room 56

On Tue, 4 Jun 2002 [EMAIL PROTECTED] wrote:

> Dear all,
> 
> 
> I was trying to do this
> 
> print "please input your variable:\n";
> $variable = <STDIN>;
> @array = qw (
>   string1
>   $variable:string2
>   string3
> )
> print "$array[1]\n";
> 
> 
> It print  "$variable:string2" instead of the value of 
> $variable:string2.
> 
> 
> How could I do what I wanted to do?
> 
> 
> Thanks a lot!
> 
> Yi Zhang
> 
> _______________________________________________
> ActivePerl mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to