|
|
"Chris Huff" <chr### [at] maccom> wrote in message
news:chrishuff-73EA9B.08380023082000@news.povray.org...
> In article <slr### [at] fwicom>, ron### [at] povrayorg
> wrote:
>
> > Perl uses the value of the last evaluated expression as the return
value.
> > Could that work?
>
> It might, I think...does it just return at the end of the function with
> the value of the last expression, or is there an equivalent to the
> "return" statement in C?
Both - it will return the last evaluated expression or you can use "return
$foo", so
sub foobar{
$foo = 1;
return $foo;
}
is the same as
sub foobar{
$foo = 1;
}
Post a reply to this message
|
|