in reply to Adding Default Values [for BEGINNERS]
For a start always use strictures: use strict; use warnings;.
It may be smart to chomp the input you read from <STDIN>:
my $file = <STDIN>; chomp $file; $file ||= "somelist";
DWIM is Perl's answer to Gödel
In Section
Seekers of Perl Wisdom