Re: a question about pack

2010-08-23 Thread Albert Q
2010/8/22 Uri Guttman : >>>>>> "AQ" == Albert Q writes: > >  AQ> 2010/8/22 Uri Guttman >  >> >  >> >>>>> "AQ" == Albert Q writes: >  >> >  >> a quick comment. pack is most likely not a beg

Re: a question about pack

2010-08-23 Thread Albert Q
2010/8/22 Dr.Ruud : > On 2010-08-22 13:16, Albert Q wrote: > >> pack '(H*)*', @values   will get the correct result. > > Now go and read perlpacktut a few times. This problem is documented in perlpacktut clearly. Thank you. > -- > Ruud > > -- >

Re: a question about pack

2010-08-22 Thread Albert Q
2010/8/22 Uri Guttman > > >>>>> "AQ" == Albert Q writes: > > a quick comment. pack is most likely not a beginner issue. i am sure you > will get help here but think about better forums for asking about > pack. there are plenty. pack is powerful and some

a question about pack

2010-08-22 Thread Albert Q
Hi I have a text file containing hex strings such as: 12 34 56 78 90 ab cd ef now I want to change these hex strings to sequence of bytes with the relative value of 0x12 0x34 0x56 bellow are my codes use strict; use warnings; sub proc_file { my ($in, $out) = @_; open my $fin, '<', $

Re: Regexp to remove spaces

2009-12-21 Thread Albert Q
2009/12/20 Dr.Ruud > > sftriman wrote: > >> I use this series of regexp all over the place to clean up lines of >> text: >> >> $x=~s/^\s+//g; >> $x=~s/\s+$//g; >> $x=~s/\s+/ /g; >> >> in that order, and note the final one replace \s+ with a single space. >> > > The g-modifier on the first 2 is bog