deMize has asked for the wisdom of the Perl Monks concerning the following question:

#!/blah/perl use Config::Crontab; my $ct = new Config::Crontab; $ct->read; my ($r) = $ct->select(-command_re => 'test'); print $r . "\n"; # Config::Crontab::Event=HASH(0 +xhex) print %r . "\n"; # 0 my %x = $ct->select(-command_re => 'test'); print %x . "\n"; # 1/8 my (%y) = $ct->select(-command_re => 'test'); print %y . "\n"; # 1/8
Update:this thread apparently has received a lot of down votes, which I guess is no fault but my own.

My scratchpad was not loading for whatever reason, so this SoPW was used as space to explain the problem. If this seems hard to follow, that's because it probably is - the original question was asked in CB and most of the replies were placed there.

This is why I didn't take too much time explaining the dilemma in post. It was only meant for those on CB that day that felt like helping me out.

Replies are listed 'Best First'.
Re: Using Data::Dumper
by Anonymous Monk on Nov 03, 2009 at 19:48 UTC
      confirmed, but Dumper($ret) is what was needed.

      $ct contains the whole crontab, whereas $ret just contains the returned value from the query.

      Thank you, deMize


      Update: As a response to the question about where $ret came from, as stated in the initial post, this was a carryover from a CB conversation. Scratchpad wasn't working, so it was posted here. $ret is the implied returned value from the query. In the case above it would be $r|x|y. I think in my CB question I actually named $r as $ret.
        If you knew all this, why did you bother to ask the (implied) original question in the first place? Were you testing the poor monks?

        And what the heck is  $ret and where did it come from, anyway?