Dear monks,
this is very much a newbie question, but I rely on your kindness: I have a set of ligature instructions that I want to add to TeX property-list files. The general idea is simple: the original file reads
(LABEL O 50)
(KRN O 200 R -0.05)
...etc
and this should become
(LABEL O 50)
(LIG O 50 O 2)
(KRN O 200 R -0.05)
...etc
So I have this
$_ =~ s/\(LABEL O 50\)/\(LABEL O 50\)\n \(LIG O 50 O 200\)/;
The problem is: not all the LABEL O XXX lines are already in the original file. Sometimes, I will have LIG instructions for a LABEL that does not exist yet. I know, e.g., that the instructions for the as yet nonexisting LABEL O 61 etc... must be placed between existing LABEL O 60 and LABEL O 62, but how can I instruct perl to include these instructions at the right address?
Thanks so much for your help!!
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.