#!/bin/perl
#
use strict;
use warnings;
open IH,"<test.txt" or die "cannot open file: test.txt";
my @data =<IH>;
close IH;
foreach my $line (@data){
my @spl = split (//,$line);
my @col1 = splice @spl,0,4; #positions 2-9;
my @col2 = splice @spl,1,7; #positions 2-9;
print @col1;
print "\n";
print @col2;
print "\n";
}
|