Create a subroutine : Subroutine Definition « Subroutine « Perl
- Perl
- Subroutine
- Subroutine Definition
Create a subroutine
#!/usr/bin/perl
print "Content-Type: text/html \n\n";
print "Program starts.\n";
&bigHeader;
print "Program ends.\n";
# subroutines below this line
sub bigHeader {
print "<h1>Welcome to Auto!</h1>\n";
}
Related examples in the same category