Help for this page

Select Code to Download


  1. or download this
    #! /usr/local/bin/perl -w
    
    use strict;
    
    open (INPUT, $ARGV[0]) or die "unable to open file";
    
  2. or download this
    my $sequence;
    my $count =0;
    my $base = ("A"|"C"|"G"|"T");
    
  3. or download this
    my @array;
    my $ideal = 250;
    
    while (<INPUT>)
    {
    
  4. or download this
    $sequence = $_;
    
  5. or download this
    @array = ();
    @array = split (/\n/, $sequence);
    
  6. 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
    }
    
  7. 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