012 and 015 eq \r and\n on what conversion chart?

Ask a Question related to PERL Beginners, Design and Development.

  1. #1

    Default 012 and 015 eq \r and\n on what conversion chart?

    tr/\012\015//d;

    So a while back ago, there was someone kind enough to pass me the above snippet of code, which removes returns
    and newlines from data attained by perl. It works great and I would like to find the conversion table that was used
    so I can obtain the numbers to rid my code of other annoying characters ..

    When I looked it up on the ascii conversion chart it said that the decimal equilvelent for 012 and 015 are ^J ^j LF lf linefeed c-J c-j \n and ^O ^o SI c-O c-o shift-in.

    Can someone tell me what 012 and 015 represent if not \r and \n? Should I be looking at another type of conversion table?







    Thanks!

    -T
    Trina Espinoza Guest

  2. Similar Questions and Discussions

    1. Refreshing chart data doesnt update chart
      I must be missing something simple here. I have a column chart that is using an array for its dataprovider. However, when I update the underlying...
    2. Arraycollection conversion to chart data
      I'm trying to get ArrayCollection mapped to an array using the Blazeds turnkey sample code. In the sqladmin example, they are creating a List...
    3. MS Excel Chart Conversion problem
      I have used "Paste Special" then Paste as a Picture (Metafile) to insert Excel charts into a number of MS Word documents. PDF files are being created...
    4. Pantone colors to RGB conversion chart or palette?
      What is the best method to get the RGB color equivalent numbers from a Pantone color/number. Is clicking on a Pantone color from a palette/swatch...
    5. RBG to CMYK Conversion Chart
      Not to mention that there are 16.7 *million* colors possible in RGB. That would be some long "chart" :-) Mac
  3. #2

    Default Re: 012 and 015 eq \r and\n on what conversion chart?

    Hi -

    Numeric literals beginning with '0' are OCTAL:

    \012 == 000 001 010 == 0x0a == decimal 10.


    Aloha => Beau;
    == please visit ==
    <http://beaucox.com> => main site
    <http://howtos.beaucox.com> => howtos
    <http://PPM.beaucox.com> => perl PPMs
    <http://CPAN.beaucox.com> => CPAN
    == thank you ==

    ----- Original Message -----
    From: "Trina Espinoza" <trina@theorphanage.com>
    To: <beginners@perl.org>
    Sent: Wednesday, August 27, 2003 1:30 PM
    Subject: 012 and 015 eq \r and\n on what conversion chart?


    tr/\012\015//d;

    So a while back ago, there was someone kind enough to pass me the above
    snippet of code, which removes returns
    and newlines from data attained by perl. It works great and I would like to
    find the conversion table that was used
    so I can obtain the numbers to rid my code of other annoying characters .

    When I looked it up on the ascii conversion chart it said that the decimal
    equilvelent for 012 and 015 are ^J ^j LF lf linefeed c-J c-j \n and ^O
    ^o SI c-O c-o shift-in.

    Can someone tell me what 012 and 015 represent if not \r and \n? Should I be
    looking at another type of conversion table?







    Thanks!

    -T


    Beau E. Cox Guest

  4. #3

    Default Re: 012 and 015 eq \r and\n on what conversion chart?

    Trina Espinoza wrote:
    >
    > tr/\012\015//d;
    >
    > So a while back ago, there was someone kind enough to pass me the
    > above snippet of code, which removes returns and newlines from data
    > attained by perl. It works great and I would like to find the
    > conversion table that was used so I can obtain the numbers to rid
    > my code of other annoying characters.
    >
    > When I looked it up on the ascii conversion chart it said that the
    > decimal equilvelent for 012 and 015 are ^J ^j LF lf linefeed c-J
    > c-j \n and ^O ^o SI c-O c-o shift-in.
    >
    > Can someone tell me what 012 and 015 represent if not \r and \n?
    > Should I be looking at another type of conversion table?
    According to ASCII, 015 is the carriage return character and 012 is the
    line feed character. The \r and \n escape sequences represent carriage
    return and line feed within perl itself but \n may be represented
    differently in files depending on the OS and file system.


    John
    --
    use Perl;
    program
    fulfillment
    John W. Krahn Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139