Advertisement
Guest User

Untitled

a guest
Mar 13th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.20 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. $foo = 'one';
  4. %tests = (
  5.   "$foo eq 'one'" => 'this is test one',
  6.   "$foo eq 'two'" => 'this is test two'
  7. );
  8.  
  9. foreach $test ( keys %tests ) {
  10.   if ( $$test ) { print "yes\n"; }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement