Next | Trivial Utilities | 56 |
Here's the core of the main program:
my $seq = seq_read($seqname); if ($op eq 'show') { # special case print join "\n", $seq->elements, ''; exit 0; } elsif ($op eq 'delete') { # another seq_delete($seqname); exit 0; } $seq = $seq->$op(\@ARGV); seq_write($seqname, $seq);
$seq is a Set::IntSpan method
$seq->$op calls a method to calculate a new Set::IntSpan
$op is exactly the value from the %canonical table
delete must be special cased because it destroys the sequence completely
Next | Menu | Copyright © 2012 M. J. Dominus |