in reply to How to retrieve arguments of command using Term::ShellUI
Otherwise, you can access the arguments directly from the @_ array variable:method => sub { my ($self, @ARGV) = @_; print "The first argument is $ARGV[0]\n"; print "The second argument is $ARGV[1]\n"; ... }
method => sub { print "I am $_[0]\n"; # print self print "The first argument is $_[1]\n"; print "The second argument is $_[2]\n"; ... }
|
|---|