in reply to Reading from <DATA> in import/BEGIN block

You can use INIT { } block for your purposes

see perldoc perlmod about INIT construct

Update sorry, I missed something.