- or download this
#! /usr/local/bin/perl -w
use strict;
open (INPUT, $ARGV[0]) or die "unable to open file";
- or download this
my $sequence;
my $count =0;
my $base = ("A"|"C"|"G"|"T");
- or download this
my @array;
my $ideal = 250;
while (<INPUT>)
{
- or download this
$sequence = $_;
- or download this
@array = ();
@array = split (/\n/, $sequence);
- or download this
while (<>) {
chomp; # lose potential newlines at the end. (only needed for portab
+ility)
print $_,"\n" if length $_ > 250; # print out any sequence longer t
+han 250chars
}
- or download this
# find every line over 250 chars from three different files, print the
+m to STDOUT
over_250 file.1 file.2 file.3
# find lines over 250 chars from STDIN
over_250 <file.1