- or download this
#!/usr/bin/perl -w
use strict;
...
}
print x; #prints 5
- or download this
sub x1
{
...
print x1; #still prints 5! Whoa!
#"return'" returns value of last true statement.
#if you don't specify something else for it to return.
- or download this
sub x2
{
...
}
print "x2:",x2; #prints "x2:" , ie nothing from sub x2
- or download this
@outputlist = map{..code...}@inputlist;