Skip to content

Instantly share code, notes, and snippets.

@audy
Created September 30, 2010 23:33
Show Gist options
  • Select an option

  • Save audy/605502 to your computer and use it in GitHub Desktop.

Select an option

Save audy/605502 to your computer and use it in GitHub Desktop.
while($line = <DATA>)
{
if($line =~ /^>/)
{
$go = 0;
chomp $line;
chop $line;
$line =~ s/^>//;
if (exists $heads{"$line"}) {
print OUT ">$line\n";
$go = 1;
next;
}
}
if($go == 1)
{
print OUT $line;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment