http://www.perlmonks.org?node_id=1029042


in reply to Adding a TAB after a certain ammount of characters

The template for the function unpack is a perfect match to your description of the problem.
use strict; use warnings; my $template = "A17A6A31A3A3A*"; while (my $line = <DATA>) { print join("\t", unpack($template, $line)); } __DATA__ 2013020400000000006810083610022013068100200220130688000200494;
Bill