in reply to Re: perl extraction from a file
in thread perl extraction from a file

Well, if you already knew, why did you ask in the first place? Whatever, the answer is that it may work in some simple case, but due to the many subtleties involved, it is deemed not to be applicable to more complex ones. So it all depends on your actual data and on how much you can rely on them.

Incidentally you may also use /g and the return value of m/// in list context although I admit that here, due to the fact that you're assigning to a single scalar, the "goatse operator" =()= would be needed and it wouldn't make such a cleaner solution.