On 11/17/06, Dr.Ruud <[EMAIL PROTECTED]> wrote:
"Dr.Ruud" schreef: > my $data = join("\n", map {sprintf "%08b", $_} > map hex, <DATA> =~ /[[:xdigit:]]+/g) . "\n" ; > > 1 while $data =~ s/(.+?)(.{7}\n.*)/$2$1/ ; Better: my $data = join "\n", map {sprintf "%08b", $_} map hex, <DATA> =~ /[[:xdigit:]]+/g ; $data =~ s/(?<=.)\z/\n/ while $data =~ s/(.+?)(.{7}\n.*)/$2$1/ ; Alternative for that last (folded) line: for ($data) {s/(?<=.)\z/\n/ while s/(.+?)(.{7}\n.*)/$2$1/} -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> Thanks Dr.Ruud. Since i am unable to understand the working of the code which you have written, I request you to explain the working for me.
Thanks and Regards, Dharshana