http://www.perlmonks.org?node_id=369280


in reply to To initialise or not to initialise?

On the other hand it can be useful to initialise values, especially global ones, with a default value, so that if you need to debug later you could print out the variable to see if it changes.

my ($title, $page, $chapter) = "somethingglobal";

print ("$title");
sub ...
my $title = "somethingelocalhere";
print ("$title");

Also if you declare and initialise at the start of the program or of each sub, it is easier to read and maintain the code, especially to non-perl programmers.