Hi, this program outputs strings which are greater in length than 250 characters (each string begins with '>'). however, i am trying to wrap the string so that it prints 60 characters per line, and its not working. The program runs fine but the wrapping doesn't work. where am i going wrong??
#! /usr/local/bin/perl -w
use strict;
open (INPUT, $ARGV[0]) or die "unable to open file";
my $count = 1;
my $line;
while (<>)
{
chomp;
$line = $_;
$line =~ s/(.{60})/$1\n/g;
if (/>/)
{
++$count;
}
print "\>$count\n", $_, "\n\n" if length $_ >= 250;
}
close INPUT;