It depends - if you know that this code will only ever run with a file where you now the format exactly then that's certainly true. Otherwise, it's quite easy, especially for the beginner, to use assumptions that my not always be met, e.g. that the sequence is always in a single line. Then you run your code against a different file and fail to realise that you have read only fractions of the real sequence and all your results are invalid. I would say that it is better to use a tried and tested module like BIo::SeqIO unless you are dealing with Gigabyte-sized files and speed is crucial.