use strict; use warnings; require ('Encode.pm'); if (exists &Encode::encode) { print "Exists\n"; } else { print "None such\n"; } #### Exists