in reply to Re: Please Help! This is a class assignment given to me.
in thread Please Help! This is a class assignment given to me.
Every perl program starts with the same three lines of code. And this is just to get you started:#!/usr/bin/perl -w use strict; use warnings;
Both use warnings and -w isn't needed, see: What's wrong with -w and $^W
Personally I prefer the shebang #!/usr/bin/env perl to say "use whatever perl is in my PATH" (see env), it'll also work better with e.g. perlbrew. Pointing to a specific perl binary makes sense if distributing a script to a system where you may not have control over the PATH (e.g. CGI scripts on hosting providers).
Update: I agree with Tux's reply: In the case of the shebang, TIMTOWTDI.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Please Help! This is a class assignment given to me.
by Tux (Canon) on Dec 07, 2019 at 10:08 UTC |