What is a Perl subroutine? How to define it?
Answer
It's the perl model for user defined functions (this is also called function like other programming languages). We can define a subroutine with the keyword sub.
sub hello {
print "hello";
}
It's the perl model for user defined functions (this is also called function like other programming languages). We can define a subroutine with the keyword sub.
sub hello {
print "hello";
}