Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Print hello world not working

by perlfan (Vicar)
on Jul 16, 2020 at 02:06 UTC ( [id://11119385]=note: print w/replies, xml ) Need Help??


in reply to Print hello world not working

That's not how you one-liner, playa. When I drop the line #!/usr/bin/perl use strict; use warnings; print "Hello, World...\n"; directly in the commandline I get nothing also because # is a comment and there's no shebang evaluation in the interactive prompt. Throw that mess in a file:
#!/usr/bin/perl use strict; use warnings; print "Hello, World...\n";
Set it executable, chmod 700 hello.pl, then run it with ./hello.pl.

If that's not it I have no idea what you're doing because any other interpretation of your post would throw an error from something. Putting it in a file will at least give you a feedback if that's not where your perl is located.

Replies are listed 'Best First'.
Re^2: Print hello world not working
by karlgoethebier (Abbot) on Jul 16, 2020 at 13:11 UTC

    Further reading

    «The Crux of the Biscuit is the Apostrophe»

    perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11119385]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-25 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found