newbie question about regex

2004-09-03 Thread Maurice Lucas
Hello, I call my script with the following line $ ./count.pl /var/log/file text this works fine but sometimes the "text" is "foo(bar)" and then my scripts gives an error. syntax error near unexpected token `foo(b' Could somebody give me a hint? I'm working on linux My script #!/usr/bin/perl

Re: newbie question about regex

2004-09-03 Thread Wiggins d Anconia
> Hello, > > I call my script with the following line > $ ./count.pl /var/log/file text > this works fine but sometimes the "text" is "foo(bar)" and then my scripts > gives an error. > syntax error near unexpected token `foo(b' > I believe the syntax error is from your shell and you can get ar

Re: newbie question about regex

2004-09-03 Thread Maurice Lucas
Hello, I call my script with the following line $ ./count.pl /var/log/file text this works fine but sometimes the "text" is "foo(bar)" and then my scripts gives an error. syntax error near unexpected token `foo(b' I believe the syntax error is from your shell and you can get around this by quoting

Re: newbie question about regex

2004-09-03 Thread David Dorward
On Fri, Sep 03, 2004 at 04:33:43PM +0200, Maurice Lucas wrote: > $ ./count.pl /var/log/file text > this works fine but sometimes the "text" is "foo(bar)" and then my scripts > gives an error. > syntax error near unexpected token `foo(b' That's a shell issue, not a Perl issue. Escape your brackets