In the below sample script, i am reading and printing first 60 characters from each line/record
open(IN,"
open(OUT,">output");
while ()
{
$st=$_;
if($st =~ /^(.{60}) +\n/si)
{
print OUT "$1\n";
}
else
{
print OUT $st;
}
}
close(output)
close(input)
© Blogger template Webnolia by Ourblogtemplates.com 2009
Back to TOP
0 comments:
Post a Comment