home bbs files messages ]

Just a sample of the Echomail archive

COMPOSL3:

<< oldest | < older | list | newer > | newest >> ]

 Message 134,780 of 135,166 
 Richard Kettlewell to Lars Poulsen 
 Re: Perl question 
 14 Jan 26 08:49:56 
 
From: invalid@invalid.invalid

Lars Poulsen  writes:
> I had a strange problem pop up today. I am working on a msall program,
> and my program file starts with something like this:

>      #! /usr/bin/perl
>      #
>          use strict;
>      my $aaa;
>      my @bbb = ( # "1ab",
>                    "2bc",
>                    "3cd"
>                ):
>
> Program runs fine, when I pun it using "perl program".
> But when I "chmod +x program" and run it as "./program"
> it has syntax errors on "use strict;" and on the commented
> out first line of @bbb.
>
> I am puzzled. Why would that be? For my use today, it does not matter,
> but I have not seen this before, and I keep the "use strict;" line in
> all my production code. Any hints for how to figure out what's wrong?

I have two hints:

1. Post the actual script, not a different script that is “something
   like” it.

2. Post the errors you get, not just say that they are “syntax errors”.

I have no idea why you think anyone would be able to debug your real
script when they can’t see it. We’re not telepaths.

--
https://www.greenend.org.uk/rjk/

--- SoupGate-Win32 v1.05
 * Origin: you cannot sedate... all the things you hate (1:229/2)

<< oldest | < older | list | newer > | newest >> ]


(c) 1994,  bbs@darkrealms.ca