in reply to How to retrieve arguments of command using Term::ShellUI

If you want to use (or need to use) the syntax $ARGV[0], $ARGV[1], etc. to access the arguments, you can do this:
method => sub { my ($self, @ARGV) = @_; print "The first argument is $ARGV[0]\n"; print "The second argument is $ARGV[1]\n"; ... }
Otherwise, you can access the arguments directly from the @_ array variable:
method => sub { print "I am $_[0]\n"; # print self print "The first argument is $_[1]\n"; print "The second argument is $_[2]\n"; ... }