pack / unpack

2002-04-21 Thread Jon Howe
I am trying to convert a file into hex from text with a view to doing some manipulation before turning it back to text. #! /usr/bin/perl -w undef $/; open(IN, "< file") || die "no on file"; $file = ; print unpack('H*',"$file"); print "\n\nCONV TO TXT HERE\n\n"; print pack('H*',"$file");

Re: pack / unpack

2002-04-21 Thread Jon Howe
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 re

Re: pack / unpack

2002-04-21 Thread Jon Howe
re:Have you got the hex code for that one? I presume this is the only > character causing difficulty - hence we really want to avoid turning > the whole string into hex numbers - which are harder to process. $values = unpack('H*',"$file"); output for the entity â~@¢ HEX: e280a20a Jon

remove duplicate values from array

2002-04-22 Thread Jon Howe
Can anyone tell me the best method for removing duplicate array values. eg: @array = qw( a a a b b b c); becomes after some operation I cant seem to figure: @new_array_or_same = (a b c);

capture out put from piped process

2002-07-15 Thread Jon Howe
How do I capture the output from sendmail running under the -v switch back to my programme. The line I am using is - open (MAIL, "|/usr/lib/sendmail -oi -t -v") or die "cant fork proc to mail\n"; regards Jon -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [E

cgi

2001-11-26 Thread Jon Howe
Is possible to have a cgi-perl script return the html form values + names, in the same order in which they appearfo in the html rm supplying the post with out having to refer to each hash/array element. An example of what I am Woking with : ## /usr/bin/perl -w use CG

Fw: mail attachments

2001-12-04 Thread Jon Howe
Hi all I have nicked this script from http://alma.ch/perl/Mail-Sendmail-FAQ.htm#attachments The thing is all works well except for the fact the attachment arrives named as perl(somenumber.kb) Does any one no how I can name the attachment the same as the value passed to file handle F by $file

Dereferencing eval-generated hashes

2002-01-30 Thread Jon Howe
I have installed the AppConfig In an attempt to try and write my own config files I have got this far: #!/usr/bin/perl -w use AppConfig qw/:argcount/; #use strict; use Data::Dumper; $| = 1; my $config = AppConfig->new(); $config->define( 'VER' => { ARGCOUNT => ARGCOUNT_L