rockmountain has asked for the wisdom of the Perl Monks concerning the following question:
This program executes perfect.#!/usr/bin/perl $var = "World"; ${$var} = "hello"; print "Variable : $var \n"; print "Interpolated var : ${$var} \n";
#!/usr/bin/perl use strict; my $var = "World"; my ${$var} = "hello"; #gives syntax error print "Variable : $var \n"; print "Interpolated var : ${$var} \n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: String interpolation problem
by davido (Cardinal) on May 03, 2004 at 07:18 UTC | |
|
Re: String interpolation problem
by Zaxo (Archbishop) on May 03, 2004 at 07:25 UTC |