- or download this
sub hello {
print $hello;
}
1; # need to end with a true value
- or download this
#!/usr/bin/perl
...
$hello="hello123";
hello(); # prints "hello123"
- or download this
sub hello {
my $hello_msg = shift;
...
hello($hello);
# or just:
# hello("hello123");