In the original post, I included the o/s along with the perl version (sun4-solaris-64int-ld). Sorry you missed it.
As I'm sure you suspected, each line ends with a CR (0d.) Were you looking for anything else?
%perl -nle' exit if $. == 15; print unpack "H*", $_' testdata.txt
416c616e6f6e2c20426172740d
353539302f454c0d
2d2d2d2d0d
4f274c657769732c204a6f686e2e0d
2d2d2d2d2f2d2d2d202d2d0d
6a6f686e0d
4c65204d7563682c426f204a6f0d
333430362f313635204e530d
656440612e6e6c0d
4162652d4a656e2c204d61722d4a6f0d
333432312f31363444204e530d
63626573740d
I was assuming that the "
== 15" was a line count, but it only printed 12 - that's all the data that's in the test file. Do you want more data?
-Theo-
(so many nodes and so little time ... )
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.