-xdirectory

tells perl that the script is embedded in a message.
Leading garbage will be discarded until the first line
that starts with #! and contains the string "perl".
Any meaningful switches on that line will be applied
(but only one group of switches, as with normal #! pro-
cessing). If a directory name is specified, Perl will
switch to that directory before running the script.
The -x switch only controls the the disposal of leading
garbage. The script must be terminated with __END__ if
there is trailing garbage to be ignored (the script can
process any or all of the trailing garbage via the DATA
filehandle if desired).