I have a file which contains report code ... which actually generates the report in Oracle like
rem ------------------------ book_tab variables --------------------- .rem .declare book_no a13 .declare l_code a10 .declare l_booking a12 .set page_no 1 .set first "N" .set no_more_clauses "N" #dt 1 1 80 # #dt 2 1 6 9 48 50 61 63 76 80 80 # .define loktabs loc_table book_tab, book_hazmat, custdata2, edit_table, book_rates, print_table in share update mode .. .define get_input select key, key1, key2, passkey3, passkey4, print_name into input_booking_seq, fax_header, file_no, input_print_rates, myNoteId, print_name from ed_table where ed_table.tag = 'BOOK' and ed_table.key = 'PRINT' and ed_table.user_id = user .. .define get_user_info select user_loc,user_name, user_company, into user_location, user_name, user_company, from sec_header where user_id = lower(substr(user,5,10)) .. .execute lok_tabs .execute get_user_info
and I need to convert these logics into perl code... Please giv me some guidance if macros are not there in perl then how to convert them into perl... I am trying to extract the value of get_user_info using regular expression but its not working at all my code is
$def = ".define get_user_info select user_location,user_name, user_company, &fax_header || +';style=' || letterhead, fax_printer, nvl(fax_yn,'N') into user_location, user_name, user_company, fax_header, fa +x_printer, fax_yn from security_header where user_id = lower(substr(user,5,10)) .."; $def =~ s/(^\.\w+\s)(\w+)(\s+)(.+)(^select\..$)/$2$5/; print $def;

In reply to Converting Oracle report language code into perl by denzil_cactus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.