in reply to add new lines to output.
open (FILE,"abc345.txt") or die $!; while (<FILE>){ $_ = /((^Query = .*)|(^\>.*)|(Length = .*))/i; print "$1\n"; print "$2\n"; print "$3\n"; print "$4\n"; } close (FILE) ;
or
open (FILE,"abc345.txt") or die $!; while (<FILE>){ $_ = /((^Query = .*)|(^\>.*)|(Length = .*))/i; print $1, "\n"; print $2, "\n"; print $3, "\n"; print $4, "\n"; } close (FILE) ;
See print for info on proper syntax.
|
|---|