cvs commit: perlfaq perlfaq7.pod
[email protected] (brian d foy) 27 Mar 2005 07:19:02 -0000
| Newsgroups | perl.cvs.perlfaq |
|---|---|
| Message-ID | <[email protected]> |
cvsuser 05/03/26 23:19:01
Modified: . perlfaq7.pod
Log:
* Do I always/never have to quote my strings or use semicolons and
commas?
+ the examples are more closely related to single quoting since
interpolation doesn't happen in these instances.
* What does "bad interpreter" mean?
+ added note that this warning may come from line-end problems
Revision Changes Path
1.22 +9 -4 perlfaq/perlfaq7.pod
Index: perlfaq7.pod
===================================================================
RCS file: /cvs/public/perlfaq/perlfaq7.pod,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- perlfaq7.pod 21 Jan 2005 12:10:22 -0000 1.21
+++ perlfaq7.pod 27 Mar 2005 07:19:01 -0000 1.22
@@ -1,6 +1,6 @@
=head1 NAME
-perlfaq7 - General Perl Language Issues ($Revision: 1.21 $, $Date: 2005/01/21 12:10:22 $)
+perlfaq7 - General Perl Language Issues ($Revision: 1.22 $, $Date: 2005/03/27 07:19:01 $)
=head1 DESCRIPTION
@@ -54,8 +54,8 @@
This is like this
------------ ---------------
- $foo{line} $foo{"line"}
- bar => stuff "bar" => stuff
+ $foo{line} $foo{'line'}
+ bar => stuff 'bar' => stuff
The final semicolon in a block is optional, as is the final comma in a
list. Good style (see L<perlstyle>) says to put them in except for
@@ -896,6 +896,8 @@
=head2 What does "bad interpreter" mean?
+(contributed by brian d foy)
+
The "bad interpreter" message comes from the shell, not perl. The
actual message may vary depending on your platform, shell, and locale
settings.
@@ -905,7 +907,10 @@
right path to perl (or any other program capable of running scripts).
Sometimes this happens when you move the script from one machine to
another and each machine has a different path to perl---/usr/bin/perl
-versus /usr/local/bin/perl for instance.
+versus /usr/local/bin/perl for instance. It may also indicate
+that the source machine has CRLF line terminators and the
+destination machine has LF only: the shell tries to find
+/usr/bin/perl<CR>, but can't.
If you see "bad interpreter: Permission denied", you need to make your
script executable.