my $foo = "I'm a string"; # this will replace previous $foo my $foo = sub { "I'm a coderef" };