You can put any license you want in the Perl script. Perhaps
you mean the use of a license code to enable the use of a
program. Many commercial programs have this feature, but
I can't remember any that is really unbreakable. Any crack
you want is available in the net. Besides it is really easy
to modify the scritp code to skip the extern function.
Unless
you code the real functionality in that function you won't
enforce your policy. If you do it's probably better to code
the whole program in that language, because you will end with
a thin wrapper to that code.
I suggest you to put your code under your preferred license
and enforce the right use the legal way. It won't make no
difference anyway to have this protection scheme.