bzzt <[EMAIL PROTECTED]> wrote:

: The following code doesn't work if I use strict.
: Is the only solution not to use strict?

   No. You could use a hash.


: #!/usr/local/bin/perl
: use strict;
: my $blues;
: $a = "blues";
: $blues = "jazz";
: print ${$a};


use strict;
use warnings;

my %music = (
    blues => 'jazz',
);

my $a = 'blues';

print $music{ $a };


HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to