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