SUB in Perl Language

SUB in Perl Language


sub testperl {
my $testperl = shift;
print $testperl;
}

Now we can use the subroutine just as any other built-in function:


testperl("test perl language");