[Perl] regex skip

Gabor Szabo gabor at perl.org.il
Fri May 9 11:57:37 PDT 2003


Shimon Halevi wrote:
> Hi guys,
>  
> What is I run a perl prog and it opens a file and process it line by 
> line into a new file But, in line 5436 it stops coz of a regex 
> compilation ERR.
>  
> Can I code it so it will skip the line and move on to the next line?

sure you can but it depends on what are you actually doing.
Maybe you should find out why is that problem ?
Can you show us the code and line 5436 of the file ?

In the meantime you can try to look at
$.  (dollar dot) contains the line number of the current input file.
in perldoc perlvar

Gabor





More information about the Perl mailing list