Saved Bookmarks
| 1. |
What are subroutines in Perl? |
|
Answer» Subroutines in PERL are named blocks containing a set of instructions meant for a specific operation. They accept ARGUMENTS and can return values operated within themselves. Perl programmers can divide their code into meaningful sub-units. The syntax is: sub subroutine_name { body of the subroutine } Program: # Function DEFINITION sub Hey { print "Hey, Karlos ! \n"; } # Function CALL Hey(); |
|