perl 模板

#!/usr/bin/perl -w
use strict;
use Getopt::Std;

sub usage
{
    print "\tUsage: ", $0, " options\n",
          "\toptions:\n",
          "\t\t-i <str>\tthe input fa file\n",
          "\t\t-o <str>\tthe ouput file prefix\n";
    exit(1);
}

use vars qw($opt_i $opt_o );
getopts("i:o:");
(defined $opt_i and defined $opt_o) or &usage();
open IN,"$opt_i" or die $!;
open OUT,">$opt_o" or die $!;

posted on 2011-08-30 13:44  香格里拉\(^o^)/  阅读(896)  评论(0编辑  收藏  举报