Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^5: Regular expressions across multiple lines

by Marshall (Canon)
on Apr 24, 2016 at 17:44 UTC ( [id://1161376]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Regular expressions across multiple lines
in thread Regular expressions across multiple lines

I looked at the FASTA format and it is ASCII, however there could be some other issue here with the program that generated this file. Can you open the original file in the text editor, eg WordPad and see the characters displayed properly? chomp() should not affect this. This "I see bizarre characters in the texteditor" is sounding like a big clue to me that format is wrong and your small example works because it is ASCII?

update: there are a bunch of modules to mess with this BIO FASTA format. Search CPAN for "FASTA". But this sounds easy enough to figure out without a module.

Replies are listed 'Best First'.
Re^6: Regular expressions across multiple lines
by abcd (Novice) on Apr 24, 2016 at 18:13 UTC
    Yes the original file displays fine in the text editor. Also I dont really see bizarre characters, just normal characters placed one on top of another which is why I thought it maybe an issue with my pc as the output file I create on removing the newlines has a very very long single line of text which my pc maybe having problems loading. But anyways thanks for the help. I will keep messing around and see if I can somehow get this to work because from the replies I have got the problem doesnt seem to be with the code itself but with something else.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1161376]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-29 11:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found