Maybe if you
printed
$line instead of
$_? You've faked yourself out it seems.
Also, you're opening
INPUT but not actually using it. You're still reading that file because, coincidentally, that is what
<> does.
A little touch up:
use strict;
my $count = 0;
open (INPUT, $ARGV[0]) || die "Could not read $ARGV[0]\n";
foreach my $line (<INPUT>)
{
chomp ($line);
$line =~ s/(.{60})/$1\n/g;
$count += />/g;
print ">$count\n$line\n\n";
}
close (INPUT);
I'm not entirely sure why you're only printing split lines.