You just want the
11th hour text, right? On my browser, I can see a weird ASCII character just before it. Let's say, for the purpose of the argument that it is ASCII code 15. The following code would do the trick:
while( <IN> ) {
chomp;
my $title = substr( $_, rindex( $_, chr(15) ) + 1 );
}
There will be a few spaces left before the first 1 in "11th" but I figure you know how to deal with that. For instance, if there are a fixed number of spaces, you could say rindex( $_, chr(15) ) + 4. The key to the
solution is the use of rindex, which will be a good deal faster than using a regex.
-- 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.