Back when I was using C a lot (before Unicode) strings were just arrays of char which are 8 bit unsigned integers.

So a 12 character string like "Hello world\n" is the 13 element array 72 101 108 108 111 32 119 111 114 108 100 10 0

The Linux ascii man page lists the C escape sequences:

    007   7     07    BEL '\a' (bell)
    010   8     08    BS  '\b' (backspace)
    011   9     09    HT  '\t' (horizontal tab)
    012   10    0A    LF  '\n' (new line)
    013   11    0B    VT  '\v' (vertical tab)
    014   12    0C    FF  '\f' (form feed)
    015   13    0D    CR  '\r' (carriage ret)

Which are the same in Perl except for \v which Perl doesn't use.

Naked blocks are fun! -- Randal L. Schwartz, Perl hacker

In reply to Re: C style strings by jwkrahn
in thread C style strings by harangzsolt33

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.