use strict; #declare the variable $foo before using my $foo; $foo = 'hello world'; print $foo;