#! /usr/bin/perl -w use strict; my $num_of_params; $num_of_params = @ARGV; if ($num_of_params < 2) { die ("\nYou haven't entered enough parameters!\n\nTo run the program type:\n\t\tperl gc3s_content.pl infile.ffn outfile.gc3s \n\n\t\tWhere window_size is the size of each window for which the program will calculate results\n"); } open (INFILE, $ARGV[0]) or die "unable to open file $!"; open (OUTFILE,">$ARGV[1]") or die "unable to open file $!"; my @fasta = ; my @gene; my $gene; my $flag; foreach my $line (@fasta) { if ($line =~ /^>/) { # print "$line\n"; $flag = 0; } # elsif ($line !~ /^>/) { elsif ($line =~ /^\w+/) { $gene = $line; $flag = 1; } if ($flag) { chomp ($gene); $gene .= $line; } } print "$gene\n";