Nagendra wrote: > All, > > Can anybody tell me , how to pack binary array into string of 32 bit words > adn print into hexa, > > $word2 = pack ("C", @line1[32 .. 63]); >
try: #!/usr/bin/perl -w use strict; my $c = pack('C*',map ord,split(//,'a line of text')); print join('',unpack('a*',$c)),"\n"; __END__ prints: a line of text i am not sure if that's what you want. david -- sub'_{print"@_ ";* \ = * __ ,\ & \} sub'__{print"@_ ";* \ = * ___ ,\ & \} sub'___{print"@_ ";* \ = * ____ ,\ & \} sub'____{print"@_,\n"}&{_+Just}(another)->(Perl)->(Hacker) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>