On the command line one can type:

perl -e "print 42"

perl -v

perl -V