in reply to Source files, packages and name spaces

Try changing around the position of where you declare the Hello package.
package Hello; sub printit; # NB: used $bar instead of special var $b for sanity our $bar = "Hello, world!\n"; sub printit { print $bar; } 1; package main; use strict; use warnings; &Hello::printit(); __output__ Hello, world!
It now works because $bar has been declared, so &printit() has something to print.
HTH

broquaint