in reply to Re^2: Direct to spreadsheet
in thread Direct to spreadsheet
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.
|
|---|