From: Frank Seitz on
Ben Bullock wrote:
> On May 7, 8:21 pm, Ronny <ro.naldfi.sc...(a)gmail.com> wrote:
>
>>On 6 Mai, 04:07, Ben Bullock
>>
>>>Just grep for oxoacyl?
>>
>>This might not help here, unless the regexp is really given literally
>>(in which case the OP likely would have found it already). I suspect
>>that there is a string interpolation going on - kind of
>>
>> m/^${protein_name}$/
>
> It's possible, but I don't see the point in speculating without
> further information from the original poster. Note that, as I pointed
> out in the part of the message you didn't quote, the original poster
> claimed he wasn't getting line numbers in the error messages, which
> isn't the behaviour of Perl 5.8 or Perl 5.10, or probably any other
> version of Perl you could find, so until that is clarified there is
> not much else to say about it. Realistically the most likely
> explanation is that he somehow missed the line numbers in Perl's error
> message.

The OP expected, strangely enough, the line number
of the input file, not the line number of the source file.

Frank
--
Dipl.-Inform. Frank Seitz; http://www.fseitz.de/
Anwendungen f�r Ihr Internet und Intranet
Tel: 04103/180301; Fax: -02; Industriestr. 31, 22880 Wedel
From: J�rgen Exner on
"Ela" <ela(a)yantai.org> wrote:
>I'm modifying a system (totally more than 100000-lines for tens of files)
>written by others and would like to identify which line leads to the
>following problem.
>
>Invalid [] range "l-c" in regex; marked by <-- HERE in m/^3-oxoacyl-[acyl-c
><-- HERE arrier protein] reductase fabg1$/

Well, the character set
[acyl-carrier protein]
does contain the range 'l-c' which is empty. Obviously that is what perl
is complaining about. Solution: just escape the dash with a leading
backslash.
However, I doubt that will produce the effect you are looking for. Are
you really, really sure you want that character set there? To me it
looks much more like you want a literal match of the text 'acyl-carrier
protein'.

>Unfortunately the error message does not tell me which line of which file
>leads to the problem.

First I didn't believe you but a quick test confirms that you are right.
The perl interpreter does not print a file/line information (tried it on
5.6.1). Wierd!

>Could anybody advise?

Just grep your files for the offending m/// instruction. Something
similar to
grep "acyl-carrier protein" *.pl

jue