#!/usr/local/bin/perl -w use strict; my $var2 = 1; # may just be $var my $one = '$var'; my $two = '$var2'; if(eval("$one")){ print "I don't want to see this\n" } if(eval("$two")){ print "I want to see this\n" }
In reply to Re^3: Using a sting with a variable name
by bangers
in thread Using a sting with a variable name
by bingohighway
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |