use vars qw( $this $that ); my $varname= @ARGV ? "this" : "that"; ${$varname}= "In use"; # This line uses a symbolic reference.