RE: question about Data::Dumper

2006-10-01 Thread chen li
> This may be a more useful test. > > use strict; > use warnings; > use Bar; > > print "Sub routine > call:\n\tBar::print_result(1,2);\n"; > my $call = Bar::print_result(1,2); > > > print "\n\nMethod > call:\n\tBar->print_result(1,2);\n"; > $call = Bar->print_result(1,2); > > __END__ >

RE: question about Data::Dumper

2006-10-01 Thread Charles K. Clarkson
chen li wrote: Let's look at the calls: : my $call=&Bar::print_result(1,2); : my $call2=Bar->print_result(2); $call gets whatever is returned by Bar::print_result(). As we see below, Bar::print_result() always returns 1. Now. we'll look at what the sub returns: : sub print_result{