GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Wednesday, December 22, 2010

Perl Subroutines

To create a subroutine in Perl, type:
sub hello
{
    print "Hello, World!\n";
}

To call it, type:
&hello;
or
$hello($_);
or
$hello(1+2,$_);
            
Share/Bookmark

No comments:

Post a Comment