You can also use "do 'filename.pl'". This does (excuse me) the same kind of thing as eval can and more. Similar security concerns apply though.
Update<\b> See http://perldoc.perl.org/functions/do.html for more info
'do filename' won't work here because the op doesn't have a complete perl file but random text interspersed with perl code. I don't see 'do' do any filtering.