You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
# Subroutines return the value of the last expression evaluated.
|
|
# Or you can use the return statement to clearly delineate the value you want returned from the subroutine..
|
|
|
|
#!/usr/bin/perl -w
|
|
|
|
$value = two();
|
|
|
|
print "Two is $value.\n";
|
|
|
|
sub two {
|
|
return 2;
|
|
}
|