>>>>> "OR" == Octavian Rasnita <[email protected]> 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  ------  [email protected]  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to