Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- use warnings;
- my $fn = 'file.txt';
- open ( my $fh, '<', $fn ) or die "Could not open file '$fn': $!";
- my @array;
- while( ! (eof $fh) ) {
- my $line1 = <$fh>;
- my $line2 = <$fh>;
- if ( defined $line2 ) {
- chomp $line2;
- $line2 =~ s/^>//; # Remove leading ">" character
- push @array, $line2;
- }
- }
- close $fh;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement