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.
In reply to Re^2: Please Help! This is a class assignment given to me.
by haukex
in thread Please Help! This is a class assignment given to me.
by vidyadithya
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |