Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The test crontab looks like thisuse Shell::POSIX::Select qw($Heading $Prompt); use Config::Crontab; $modcron = 1; if (defined($modcron)) { modifycron(); exit; } sub modifycron { $Heading="\n Pick an Option\n\n"; $Prompt="Enter selection: "; select ('Display','Activate') { if ( $Reply == 1 ) { $ct = new Config::Crontab; $ct->read; print $ct->dump; } elsif ($Reply == 2) { $ct = new Config::Crontab; $ct->read; $block = $ct->block($ct->select(-command_re => "key="); } }
Running this gives me# # Host specific jobs #################### # #00 8 * * * $MYBIN/my_prog.pl; # key=my_prog #00 9 * * * $MYBIN/my_prog2.pl; # key=my_prog2
I'm trying to build a (ksh style select) menu around the crontab modulesyntax error at ./test.pl line 151, near ");" Missing right curly or square bracket at ./test.pl line 186, at end of + line syntax error at ./test.pl line 186, at EOF Execution of ./test.pl aborted due to compilation errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Conflicting modules
by rafl (Friar) on Mar 14, 2006 at 11:41 UTC | |
|
Re: Conflicting modules
by izut (Chaplain) on Mar 14, 2006 at 12:38 UTC | |
by Anonymous Monk on Mar 14, 2006 at 13:14 UTC |