in reply to Is it possible to include GetOpt flags in $0

Just use @ARGV:
use strict; my @commandline=@ARGV; unshift @commandline, $0;

CU
Robartes-