Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: syntax error near unexpected token `)'

by zwon (Abbot)
on May 20, 2012 at 17:03 UTC ( #971499=note: print w/replies, xml ) Need Help??


in reply to syntax error near unexpected token `)'

It is something related to bash in fact. See QUOTUNG section in the manual:

Enclosing characters in single quotes preserves the literal value of each character within the quotes. A single quote may not occur between single quotes, even when preceded by a backslash.
  • Comment on Re: syntax error near unexpected token `)'

Replies are listed 'Best First'.
Re^2: syntax error near unexpected token `)'
by vit (Pilgrim) on May 20, 2012 at 17:05 UTC
    Then how to handle a single quote match?
      This sounds more like a bash question to me, but you can replace single quotes with \N{APOSTROPHE} or \x27. In bash you can do it like this:
      $ echo 'aa'"'"'bb'; aa'bb

        Alternatively and one shorter: Change ' to '\''.

        $ echo 'aa'\''bb'; aa'bb

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://971499]
help
Chatterbox?
[GotToBTru]: heh
[GotToBTru]: I
[GotToBTru]: ve been looking at a document we have been sending to a customer for years now
[MidLifeXis]: We don't, at least in this case ;-)
[GotToBTru]: and it includes a reference number that I didnt recognize
[GotToBTru]: I had to dig into the code to find out where it came from .. and it makes no sense
[GotToBTru]: so I emailed my contact asking if we could just stop sending it .. I'm afraid she is going to ask "what is that anyway?"
[MidLifeXis]: heh.

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2017-01-20 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (176 votes). Check out past polls.