Read through perldoc -f eval. The following shows a quick demo.
#!/usr/bin/perl use strict; use warnings; open FILE, "test1.pl" or die "Cannot read test1.pl: $!\n"; my $file = join '', <FILE>; close FILE; eval $file; # Check for errors. die $@ if $@;
In reply to Re: Open a .pl file form a .pl file
by Molt
in thread Open a .pl file form a .pl file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |