Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.




  • BioScripts
  • Jit
  • Remove the duplicated line present only next to each other with Perl

Remove the duplicated line present only next to each other with Perl

  • Public
By Jit 2278 days ago
#!/usr/bin/perl use strict; use warnings; { $_ = <DATA>; my $next_line; while( $next_line = <DATA> ) { #print "current line: $_ -- next line: $next_line$/"; print $_ if $_ ne $next_line; } continue { $_ = $next_line; } print $_ if eof; } __DATA__ apple apple plum vinegar apple banana banana banana apple