RE: using a string as a scalar under strict

2004-07-28 Thread Charles K. Clarkson
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 =

Re: using a string as a scalar under strict

2004-07-28 Thread WilliamGunther
In a message dated 7/28/2004 4:28:12 PM Eastern Standard Time, [EMAIL PROTECTED] writes: >The followin code doesn't work if I use strict. Is the only solution not to >use strict. >#!/usr/local/bin/perl >use strict; >my $blues; >$a = "blues"; >$blues = "jazz"; >print ${$a}; This is using a soft,

Re: using a string as a scalar under strict

2004-07-28 Thread whaity
On Wed, Jul 28, 2004 at 09:20:18PM +0300, bzzt wrote: > The followin code doesn't work if I use strict. Is the only solution not to > use strict. > #!/usr/local/bin/perl > use strict; > my $blues; > $a = "blues"; > $blues = "jazz"; > print ${$a}; > hello you need a backslash. #!/usr/bin/perl us

Re: using a string as a scalar under strict

2004-07-28 Thread JupiterHost.Net
bzzt wrote: The followin code doesn't work if I use strict. Is the only solution not to use strict. #!/usr/local/bin/perl use strict; my $blues; $a = "blues"; 1) you didn't do my $a; 2) $a should be avoided because its used by perl (perldoc -f sort) $blues = "jazz"; print ${$a}; This is a soft ref

using a string as a scalar under strict

2004-07-28 Thread bzzt
The followin code doesn't work if I use strict. Is the only solution not to use strict. #!/usr/local/bin/perl use strict; my $blues; $a = "blues"; $blues = "jazz"; print ${$a}; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]