http://www.perlmonks.org?node_id=980610


in reply to Re: calling a subroutine from another subroutine
in thread calling a subroutine from another subroutine

Usage: $ARGV[0] -type[A|B] -OEMID id -version nnnn -out filename
I think you meant to use $0 instead of @ARGV:
$ARGV[0] is the first argument, not the program's command name itself. See $0 for the command name.