Hi,
Use Array Reference.
$file=' level 1 section1 section2 level 2 section3 section4 level 2 '; while ($file=~s#(level [0-9].+?)(level [0-9])#$2#s) { $a=$1; @b=$a=~m#(section[0-9])#g; push (@array, [@b]) }
In reply to Re: Regular expression match in file
by gopalr
in thread Regular expression match in file
by perlsen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |