in reply to patriotic japh

Just as a note to everyone else: This code does not work correctly under Windows due to coloration of the text. Now, if I friggin knew how pack worked, maybe I could patch it.

Replies are listed 'Best First'.
Re: Re: patriotic japh
by Asmo (Monk) on Oct 13, 2001 at 13:42 UTC
    the problem is that you cannot update the code directly, you first have to unpack all the __DATA__ , modify it, and then repack it so that it can work with unpack "H*"
      Sorry, i'd tried it on win98, freebsd,linux, and win2k, and it'd worked..
      but i'd also had ansi.sys loaded on win98/dos.. here it is without ansi codes (:
      #!/usr/bin/perl -w use strict;map{chomp;print pack("H*","$_");}<DATA> __DATA__ 4a20412050204820200a1b5b6d75206e2065 206120200a73206f2072206320200a742074 206c206b20200a2020682020206520200a20 20652020207220200a202072202020202020 0a2008200820082008200820082008200820 082008200820082008200820082008200820 0820 0820 08 20 20 08 20 08 20 07 20 08 20 08 20 08
      as a side note, it's also possible to edit it if you know what the hex codes mean (:
      i wouldn't be surprised if some of the monks around here, having more experience with pack()/unpack() than myself, were able to decypher it without using any pack method at all. (8
      also, the ascii codes for \b (08) and " " (20) seem to work fine on the machine i'm using to reply (win98). let me know if they're fudging the effort up on your end.
      strfry()
      "and have a pleasant tomorrow..." -- SNL, Weekend Update