Sorry, didn't notice that wrinkle the first time through. <TXT> needs to disappear - you are no longer using a file remember. I'd rework it to shift the lines out of the array bthus:
while (@data2) { $_ = shift @data2; if( m[/\*] ) { $_ .= shift @data2 until m[\*/] or ! @data2; s[ \s? / \* .+? \* / \s? ][]smgx; } }
Note that the chomps are not required because they weren't added to the lines in the array. Note also the check for end of data in the until.
In reply to Re^3: Direct to spreadsheet
by GrandFather
in thread Direct to spreadsheet
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |