in reply to calling perl subroutine from shell

If you execute perl -help you will notice "-[mM][-]module  execute `use/no module...' before executing program" among the command line options so:

perl -Ma -e 'clear_scr()'

should do what you want assuming a.pm exports clear_scr.

Update: removed bogus .pm!


DWIM is Perl's answer to Gödel