If I want to match the above record format, i.e. Name, Phone, Address (separated by NL), in a file with a whole bunch of these, what should I do? The way I do it right now is to read file into array, then use join operator on array to assign lines to a scalar, then use a multi line regex that scans for the record pattern of Name Phone Address using the multi line match modifier. I am successful at this. But is this the right way? I am concerned that using the join operator to assign thousands of lines to a scalar and then doing a multi line match for the pattern is not portable because not all implementations may be able to store thousands of lines in a scalar using join
In reply to proper way of matching multiple line patterns by perlperlperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |