in reply to Splitting into variables columned data without delimiters with a regexp ?

I agree with BrowserUk's reply: I cannot imagine that a regex would be faster (or, if at all, to any significant degree) than unpack in extracting what seem, from the description in the OP, to be fixed-width data fields.

I would like to add that the lack of example input and output in the OP makes it much harder (for me at least) to understand exactly what is required. Even a very simple example would have helped greatly.

  • Comment on Re: Splitting into variables columned data without delimiters with a regexp ?

Replies are listed 'Best First'.
Re^2: Splitting into variables columned data without delimiters with a regexp ?
by gerleu (Novice) on Nov 16, 2011 at 09:21 UTC

    Hello, I'm back with my findings ! In my case, I'm getting the columned data from a file and I've benchmarked global unpacks with file slurping against real-time settings of the different variables by specific sequential read statements: the second solution is always faster ! And I guess this is simply due to the efficient I/O read buffer provided with my Linux Ubuntu OpSys... Many thanks anyway for all your pertinent remarks, as ever, which learned to me a lot about our beloved programming language, Perl of course :-) Bye now, Germain