open (IF, "/home/stanley/Desktop/18048320.txt"); my $text = ; my @splittext = split (/[.] [A-Z]/, $text); close (IF); #### open my $if, '<', '/path/to/file' or die "/path/to/file: $!"; # complete file content in one scalar my $text = do { local $/; <$if> } close $if; #### #for my $gene ( ) { while ( my $gene = ) {