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 ... )
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|