in reply to Re: C style strings
in thread C style strings

I should have mentioned that I am trying to parse a C source code, and extract only the values. But the eval solution looks really clever! The only concern I have is what are the exact differences in C and Perl specification? Just the $ and the @ ? That's all? I was trying to go by the Wikipedia description of C escape sequences and how they work.

Replies are listed 'Best First'.
Re^3: C style strings
by LanX (Saint) on Dec 31, 2022 at 15:12 UTC
    > Just the $ and the @ ? That's all?

    I don't know, but it's unlikely.

    I suppose Perl augmented it's "escapism" over the versions.

    More importantly, what are the specifications for C and do they also depend on the version?

    For instance I had problems with the \u , and if it comes to Unicode inconsistencies then problems will be even manifold.

    Cheers Rolf
    (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
    Wikisyntax for the Monastery

      Hmm... Yes, in TinyPerl 5.8, "\uFF00" becomes literal "FF00" instead of "\xFF\0", so eval isn't so clever after all. At least not in TinyPerl 5.8. :/