in reply to Re: Getting lines in a file between two patterns
in thread Getting lines in a file between two patterns
Here is what I've got running:
while (<INPUT>){ if ($_ =~ /HISTORY/../TABLE/){ open(OUTPUT, '>'.$outputfile) or die "Can't create $output +file.\n"; print OUTPUT "$_\n"; close OUTPUT; } }
The data I'm trying to pull out is in a table (in Word) and it will find the flip/flop, print it to the OUTPUT. That much is working. However, the data it returns is a jumbled mess of characters. It isn't intelligible.
So, I tried saving a docx as rtf... no luck (it won't copy the table data, only gobbledegook), then I tried .txt... That returns the text/data, but I lose the neat and tidy layout of the table.
Any suggestions on how to copy the table as a table or at least delimited somehow?
Thank you again,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Getting lines in a file between two patterns
by 1nickt (Canon) on Oct 31, 2015 at 03:53 UTC |