in reply to Explanation of 'use strict;'
replace "$name = <STDIN>" with "my $name = <STDIN>".
This way you tell perl you know the variable didn't exist before that line. If not, "use strict" will warn you to prevent you from trying to access an unknown variable.