Well, as I said, it was the e modifier I was missing. I had done plenty of searches and had indeed read various parts of perlretut such as
http://perldoc.perl.org/perlretut.html#A-bit-of-magic%3a-executing-Perl-code-in-a-regular-expression
and
http://groups.google.com/group/perl.beginners/browse_thread/thread/a11b27b5c5efb6ae
http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=regex+increment
Please could you suggest ways of searching for something in a way that answers the question when you are not exactly sure how to phrase the question. That would be better than telling me to read the documentation that I have just searched.
I thought the philosphy here was "A stupid question is an unasked question". Not "let me waste my time telling you to read the manual while I sit all smug because I know all the answers".
My apologies if I have misinterpreted your reply. Thank you very much for your helpful suggestions.
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.