in reply to using strict refs
should do what you're after#!/usr/bin/perl -w use strict; my $i = "test"; my $test = "success"; { no strict 'refs'; print "$$i\n"; }
UPDATE: Beaten to it by bwana147. Must type faster...
UPDATE: and correctly as Hofmator rightly points out,symbolic references will not work for lexical variables.
|
|---|