in reply to use strict and subroutines

When you return a value from a subroutine, you should 'catch' it in a variable, or use it outright:
my $myname = myname(); # or print myname(), "\n";
A return token is really quite optional - Perl will return the last value evaluated, so:
sub myname { my $name = "bill"; }
will return 'bill.' As for your second example - $myname is declared outside of sub myname - but it is accessible by myname(). It works because you defined $myname, unlike you did in the first example.

The best way to deal with this is like so:

my $myname = myname(); print "my name is $myname\n"; sub myname { my $name = "bill"; # notice subtle change in variable name return $name; # not necessary, $myname works too } # but it is not the same $myname ;)

Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--