From: Ela on
Dear all,

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$/

Unfortunately the error message does not tell me which line of which file
leads to the problem. Could anybody advise?


From: Ben Bullock on
On Tue, 06 May 2008 09:44:32 +0800, Ela 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$/
>
> Unfortunately the error message does not tell me which line of which
> file leads to the problem. Could anybody advise?

Just grep for oxoacyl?

In Perl you can do it like this:

cat *.pl | perl -n -e 'print "$.:$_" if /oxoacyl/;'

But are you sure there are no line numbers?

#!/usr/local/bin/perl
print if /[z-a]/;

Invalid [] range "z-a" in regex; marked by <-- HERE in m/[z-a <-- HERE ]/
at ./usenet-2008-5-6-c.pl line 2.

I got the line number at the end there.


From: Ronny on
On 6 Mai, 04:07, Ben Bullock <benkasminbull...(a)gmail.com> wrote:
> On Tue, 06 May 2008 09:44:32 +0800, Ela 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$/
>
> > Unfortunately the error message does not tell me which line of which
> > file leads to the problem. Could anybody advise?
>
> 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}$/

In this case, a simple source code search wouldn't be of much help.

Ronald
From: Ben Bullock on
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.
From: Dr.Ruud on
Ela schreef:

> 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$/
>
> Unfortunately the error message does not tell me which line of which
> file leads to the problem. Could anybody advise?

This is not a runnable and minimal source. Go and read the Posting
Guidelines again.

--
Affijn, Ruud

"Gewoon is een tijger."