Syntactic Confectionery Delight | |
PerlMonks |
Re: Print hello world not workingby kcott (Archbishop) |
on Jul 15, 2020 at 07:24 UTC ( [id://11119346]=note: print w/replies, xml ) | Need Help?? |
G'day ferbio, Welcome to the Monastery. The most likely cause is your shebang line: '#!/usr/bin/perl'. On one computer, perl is installed in /usr/bin/; on another computer, it's installed elsewhere. You need to tell us which OSes you're using and show all output. It seems odd that you get no output at all: perhaps no "Hello, World...", but were there any other messages. Here's what I get when I try to run perl from both an existing and non-existing location:
Putting your posted code — but using an invalid path to perl in the shebang line — into a script and running:
Take a look at perlintro for a gentle introduction of this concept; perlrun has a more detailed discussion. [Note: Please put all code, data and program output within <code>...</code> tags. Doing so will mean that HTML rendering (e.g. converting a sequence of whitespace characters into a single space) will not affect what you post. It also allows us to access a verbatim copy. See "How do I post a question effectively?" and "Writeup Formatting Tips".] — Ken
In Section
Seekers of Perl Wisdom
|
|