The reason you're not getting the answer you want is that you haven't yet presented the problem in an easy-to-understand format. I don't think it
is obvious that you're looking for "
a string ending with one of '.!?'". For one thing, there isn't such a regex in your program. Maybe you meant ".?!", from the line "
m/^\d+\. (^:+): (.+?.?!) ..."? But, I'm sorry, I still have no idea what you're trying to do. I spent about 10 minutes just trying to get your program to output something, before I realized the input has to contain multiple lines, and then a following blank line. This is the kind of thing where you have to help us to help you, by saying something along the lines of: "To run this program, perform the following steps ...".
My suggestion is that you simplify this down to just a few lines, where the problem you're having is exhibited in a brief example. Make the input a hardcoded list; eg.:
my @lines = (
"110. Wunder, E.; Burghardt, U.; Lang, B.; Hamilton, L.: Fanconi's",
"anemia: anomaly of enzyme passage through the nuclear membrane? Ano
+malous",
"intracellular distribution of topoisomerase activity in placental",
"extracts in a case of Fanconi's anemia. Hum. Genet. 58: 149-155,",
"1981.",
"",
);
so it doesn't take the user a lot of extra setup to be able to duplicate the problem. Perhaps you can even show several examples (with code, not just words) of what you've tried. The reason I'm suggesting this is twofold -- not only will you make the problem quicker to reproduce, and thus more tempting to try to solve, but you may actually find an answer yourself in the process of elucidating what you've tried.
@ARGV=split//,"/:L";
map{print substr crypt($_,ord pop),2,3}qw"PerlyouC READPIPE provides"
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.