in reply to Re^10: Converting Oracle report language code into perl
in thread Converting Oracle report language code into perl
When you did @arr = <FH>;, you broke your file into an array of lines. One per array element.
When you do foreach $data(@arr){, you are setting $data to each of those lines in turn. Ie. $data will only ever contain one line at a time.
So, when you do $data =~ s/(^\.\w+\s+)(\w+)(\s+)(.+\w+$)(\s+\. \.$)/$2,$4/smx;, which is attempting to match this:
.define lok_tabs lock tab book_tab, book_mat, custdata2, ed_tab, book_rates, print_tab in share update mode ..
which is spread over 4 lines, it will always fail.
How could it match 4 lines in one line?
Do you have any ideas for how you might get around this problem?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^12: Converting Oracle report language code into perl
by denzil_cactus (Sexton) on Jun 27, 2007 at 13:06 UTC | |
by BrowserUk (Patriarch) on Jun 27, 2007 at 13:28 UTC | |
by denzil_cactus (Sexton) on Jun 28, 2007 at 04:58 UTC |