I tried using require but if I need to include the same file twice it tells me the libary is already loaded. Idealy I'd like something like PHP's include command.Any suggestions?if ($var eq "foo") { Include file1.pl and execute code } if ($var eq "bar") { Include file2.pl and execute code } else { Include file1.pl and execute code }
Originally posted as a Categorized Question.
In reply to How do I include a file and execute the code in the file? by xorl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |