FAQ
"OR" == Octavian Rasnita writes:
OR> Perl doesn't use functions, but subroutines or methods, so they don't

don't say that. subs and functions are just synonyms. it is how you use
the sub that changes its meaning.

OR> need to return something if you don't want them to return something.
OR> If they return something they work like a function.

subs in perl ALWAYS return something, either the value from return or
the last evaluated expression. even an empty sub {} returns undef/()
depending on wantarray. it is up the caller to use or ignore the return
value.

uri

--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 12 | next ›
Discussion Overview
groupbeginners @
categoriesperl
postedJan 12, '11 at 9:24p
activeJan 13, '11 at 10:39a
posts12
users7
websiteperl.org

People

Translate

site design / logo © 2021 Grokbase