in reply to Reading an array with a single value (My 2nd completed script!)
in one place, but not in others. so (using suaveant's good suggestion for an additional subroutine to handle a repeated task), it would look like:chomp(my $answer=<STDIN>);
since most of the time when you get user input you're going to want to remove the newline, i like doing it all on one line.chomp ( $in=<STDIN> );
|
|---|