in reply to Source files, packages and name spaces
It now works because $bar has been declared, so &printit() has something to print.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!
broquaint
|
|---|