in reply to using strict refs
Locally disable the strict (UPDATE: NO, DON'T! Praises go to Hofmator for correcting this goof):
Or use eval:#!/usr/bin/perl -w use strict; my $i = "test"; my $test = "success"; { no strict 'refs'; print "$$i\n"; }
#!/usr/bin/perl -w use strict; my $i = "test"; my $test = "success"; print eval qq{"\$$i\\n"};
--bwana147
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: using strict refs
by Hofmator (Curate) on Aug 28, 2001 at 18:02 UTC |