Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Print hello world not working

by haukex (Archbishop)
on Jul 15, 2020 at 06:54 UTC ( [id://11119345]=note: print w/replies, xml ) Need Help??


in reply to Print hello world not working

Dear Monks, The simplest script #!/usr/bin/perl use strict; use warnings; print "Hello, World...\n"; Works fine in my computer (Printing in the CMD screen "Hello World") but in other computers did not print anything on the screen after installing the same perl version. What is happening?

That's pretty unusual, and I think you'll have to explain exactly how you're calling this script on both computers so we can help you better. Since you say "CMD" I guess this is Windows? Are you using ActivePerl or Strawberry Perl, and what version? When you open the command prompt on both computers and type perl -v, it should output the same thing; that's assuming your PATH environment variable is set up correctly; if for example you're using the portable edition of Strawberry Perl, you'll have to navigate to its folder first (Update: or use its batch file to start the shell). It should also do the same when you type perl scriptname.pl for your script filename. Or, are you double-clicking the scripts to run them? Note that this sometimes requires additional steps to get working. (By the way, please use <code> tags to format code and data.)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-23 06:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found