Re: Error message

From John R. McPherson
DateTue, 14 Jan 2003 09:05:56 +1300
Subject Re: Error message
In-Reply-To (3E2305CB-9090007-reltech-org)
On Mon, Jan 13, 2003 at 01:30:35PM -0500, Tim Finney wrote:

> Now to the title_icon.pl problem.
>
> I have an Intel P4, RedHat 7.3 Linux, gsdl-2.38-linux, gimp 1.2.3-4,
> gimp-perl-1.2.3-4.

> I found that the script title_icon-1.2.pl will run. If I replace
> title_icon.pl with title_icon-1.2.pl, I get:
>
> [tfinney@alpha gimp]$ cp title_icon.pl title_icon.sav
> [tfinney@alpha gimp]$ cp title_icon-1.2.pl title_icon.pl
> [tfinney@alpha gimp]$ perl -S buildcol.pl -create_images home
> title_icon.pl: Unmatched ( before HERE mark in regex m/^HASH( << HERE
> 0x8108e2c/ at /home/tfinney/gsdl/bin/script/gimp/title_icon.pl line 385.
> (DIE)
> title_icon.pl: Unmatched ( before HERE mark in regex m/^HASH( << HERE
> 0x8108e2c/ at /home/tfinney/gsdl/bin/script/gimp/title_icon.pl line 385.
> (DIE)

Hi,
there is a problem with this perl script, so that if your string contains
characters that are meaningful to perl regular expressions it gets confused.
The solution is to replace line 385:
$text =~ s/^$line//;
with:
$text =~ s/^Q$lineE//;
so that the variable $line is not interpreted again...
I've fixed this now in CVS.

Thanks for taking the time to submit some feedback....

John

--
"Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it."
-- Brian Kernighan