in reply to Re^2: Passing entered value into sub for IO::Prompt
in thread Passing entered value into sub for IO::Prompt
Use:
sub CheckDate { my $date = $_; print "Date: $date\n"; return true; }
and \&CheckDate(), in the -require.
Note that the parameter list to prompt is built when the call to prompt is executed, but that the context that CheckDate is called from is way down in the processing of prompt somewhere. During the parameter processing part of the call to prompt the only thing of interest is the reference to the sub to be called.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Passing entered value into sub for IO::Prompt
by bowei_99 (Friar) on May 28, 2008 at 01:34 UTC |