in reply to Inconsistencies between Perl versions
Now, line 120 is the start of one of my subroutines, which contains a foreach loop, and very little else (see below for code). The loop variable does, in fact, have a $, and this error seemed bizzare, all the more so because this didn't come up during previous testing.It's right that it's an error in that ancient Perl, although the error is misleading.
The "my" on a foreach loop variable wasn't introduced until either 5.4 or 5.5 (I don't recall which). The error message was reporting a syntax error from the perspective of Perl 5.1, which just had no clue about such syntax.
And how in the world are you still running 5.1? There are known security holes in that code! I hope you're not facing the internet with a CGI script running that version.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: •Re: Inconsistencies between Perl versions
by Tanalis (Curate) on Apr 30, 2003 at 09:34 UTC | |
by Fletch (Bishop) on Apr 30, 2003 at 13:52 UTC |