Steve Lobach wrote:
> 
> I have a perl script that acts like grep, however, it doesn't totally do what is 
> expected..
> The script is called peg..
> 
> It supposedly takes regex or perl expressions for parameters.. however I have to 
> search for the following string :
> 
> TDS-RES.1.2345678

If you just want to search for a text string it might be better to use
undex.

perldoc -f index


> but when I use the following regex it fails:
> 
>  peg "TDS-RES/.1/.2345678" MEDLAB*
> peg: error in Perl expression: (TDS-RES\.1\.2345678)
> Backslash found where operator expected at (eval 1) line 1, near "RES\"
> Backslash found where operator expected at (eval 1) line 1, near ".1\"

perldoc perldiag
[snip]
       %s found where operator expected
           (S) The Perl lexer knows whether to expect a term or
           an operator.  If it sees what it knows to be a term
           when it was expecting to see an operator, it gives you
           this warning.  Usually it indicates that an operator
           or delimiter was omitted, such as a semicolon.


>         (Missing operator before \?)
> syntax error at (eval 1) line 1, near "RES\"
> You have mail in /usr/spool/mail/pegate
> 
> what would be the appropriate Perl expression for this search?  Thanks, Steve.

You would have to show the actual code (copy and paste) for us to be
able to spot the mistake.


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to