Convert xpls to a BASH here-doc

Licensing routines are just too broken on Linux without Antelope
environemnt set up properly. We'll do this the easy way - import the
Antelope environment properly and treat the perl script as a big HEREDOC
string