User Input



examples/scalars/read_from_stdin.pl
#!/usr/bin/perl
use strict;
use warnings;

print "Enter your name, please: ";
my $name = <STDIN>;
print "Hello $name - how are you ?\n";

$ perl examples/scalars/read_from_stdin.pl
Enter your name, please: Foo
Hello Foo
 - how are you ?

There is this problem of the newline