X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfaq7.pod;h=a735edc7c880dbfb1e36234675090ae53c9f6fe5;hb=a5365663f59d38ce50a53f9b46b25daa36d5ab17;hp=6eb2a6b4bfeafe5a216ea0541b359aa27a9f5a18;hpb=197aec242db45fbf1d7853a1ae22a108cc09d23c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfaq7.pod b/pod/perlfaq7.pod index 6eb2a6b..a735edc 100644 --- a/pod/perlfaq7.pod +++ b/pod/perlfaq7.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq7 - General Perl Language Issues ($Revision: 1.12 $, $Date: 2002/12/06 07:40:11 $) +perlfaq7 - General Perl Language Issues ($Revision: 1.15 $, $Date: 2003/07/24 02:17:21 $) =head1 DESCRIPTION @@ -519,7 +519,7 @@ However, dynamic variables (aka global, local, or package variables) are effectively shallowly bound. Consider this just one more reason not to use them. See the answer to L<"What's a closure?">. -=head2 Why doesn't "my($foo) = ;" work right? +=head2 Why doesn't "my($foo) = EFILEE;" work right? C and C give list context to the right hand side of C<=>. The read operation, like so many of Perl's @@ -808,7 +808,7 @@ symbolic references, you are just using the package's symbol-table hash (like C<%main::>) instead of a user-defined hash. The solution is to use your own hash or a real reference instead. - $fred = 23; + $USER_VARS{"fred"} = 23; $varname = "fred"; $USER_VARS{$varname}++; # not $$varname++ @@ -879,6 +879,31 @@ subroutines, because they are always global--you can't use my() on them. For scalars, arrays, and hashes, though--and usually for subroutines-- you probably only want to use hard references. +=head2 What does "bad interpreter" mean? + +The "bad interpreter" message comes from the shell, not perl. The +actual message may vary depending on your platform, shell, and locale +settings. + +If you see "bad interpreter - no such file or directory", the first +line in your perl script (the "shebang" line) does not contain the +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. + +If you see "bad interpreter: Permission denied", you need to make your +script executable. + +In either case, you should still be able to run the scripts with perl +explicitly: + + % perl script.pl + +If you get a message like "perl: command not found", perl is not in +your PATH, which might also mean that the location of perl is not +where you expect it so you need to adjust your shebang line. + =head1 AUTHOR AND COPYRIGHT Copyright (c) 1997-2002 Tom Christiansen and Nathan Torkington.