If I run perl
by itself from the linux command line, nothing happens. I see the cursor move down a line and if I enter print "Hello, world";
, still nothing happens. Is there anything I can input from the command line from here? I know that you can run perl -e 'print "Hello, world"';
and how to create a perl script. Just wondering why running perl
by itself does nothing.
Type the following:
$ perl
print "Hello World\n";
Ctrl-D
Hello World
$
That's last line is you holding down the Control key and pressing D
. Not typing Ctrl-D.
If you type stty -a
, you'll see that Ctrl-D is he EOF character. That's Perl reading in a file from STDIN. Is that what you want?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With