There's more than one way to do things | |
PerlMonks |
Splitting into variables columned data without delimiters with a regexp ?by gerleu (Novice) |
on Nov 01, 2011 at 09:21 UTC ( [id://935065]=perlquestion: print w/replies, xml ) | Need Help?? |
gerleu has asked for the wisdom of the Perl Monks concerning the following question: Hello again and sorry to bother you with a perhaps interesting question: I've a text without any data or line delimiters and I need to put into different variables (ideally $1, $2, etc.) for example the data in the positions 0 (first char) to 5, then in another variable the data in the positions 6 to 10 for each chunk of 6+5=11 chars and then continue afterwards with the following chunks. But I need to do it using a regexp instead of unpack('A6 A5',$chunk_of_data) because the later is soooo slow... Please can you suggest me a regexp to do it in a very efficient way ? I'm searching since a while without a result ! Many thanks in advance for your celestial help to fulfill my humble prayer... Germain from http://www.vehicall.com
Back to
Seekers of Perl Wisdom
|
|