http://qs1969.pair.com?node_id=591213


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