I should have been more specific or my be I have missed the point again :( the file is UTF-8 encoded which is fine for what I want.
However, I need to get at bullet points within the text. these apear as the entity â~@¢ in vi. So I thought if could the hex value It would able to deal with any regexification in that form and the go back to text. Does the solution you surgest still apply? Jon ----- Original Message ----- From: "Jonathan E. Paton" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, April 21, 2002 1:37 PM Subject: Re: pack / unpack > > I am trying to convert a file into hex from text > > with a view to doing some manipulation before > > turning it back to text. > > One has to ask: WHY??? > (Unless using tools that already exist) > > Perl can handle both text and binary information, > and you can do all your binary manipulations as > if you were manipulating strings. > > use byte; #Perl 5.6 and greater - I think > > E.g. > > $data =~ s/^\x41/\x42/; > > will replace the first byte (an ASCII 'A') into > (an ASCII 'B'). For more information type: > > perldoc byte > > Which I hope works :) > > Jonathan Paton > > __________________________________________________ > Do You Yahoo!? > Everything you'll ever need on one web page > from News and Sport to Email and Music Charts > http://uk.my.yahoo.com > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]