John,

The problem is not that it does not call the second subroutine, but that the
second subroutine does not output anything.

On Jan 3, 2006, at 12:39 PM, John W. Burns wrote:

[cut]


  my %dispatch = (
     "foo" =>  sub {
  my $x = 3;
  my $ans = ($x**2);

  print "answer is: $ans \n"; #prints "answer is: 9"

  },
 "moo" =>  sub {
  my @data = (3,7,15,28);
  my $radius;
  my $radius_ref = @data;

Your error is the the above line. That line should be:
my $radius_ref = [EMAIL PROTECTED];
Since you want the reference to the data array.

[cut]

Hope that helps.

Gautam Dey.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to