For example, this is the results running the script in a directory containing 10 ktf files.
%,0,N59°3.248' E13°2.656',65.99,2009-09-16 09:51:42,,,$
%,0,N59°3.577' E13°2.460',53.97,2009-09-16 10:05:38,,,$
%,0,N59°3.576' E13°2.462',55.89,2009-09-16 10:07:51,,,$
%,0,N59°3.648' E13°2.924',55.89,2009-09-16 10:14:10,,,$
%,0,N59°3.652' E13°2.937',55.41,2009-09-16 10:19:17,,,$
%,0,N59°3.454' E13°3.092',55.89,2009-09-16 10:25:05,,,$
%,0,N59°3.453' E13°3.467',58.30,2009-09-16 10:31:30,,,$
%,0,N59°3.451' E13°3.466',57.34,2009-09-16 10:36:06,,,$
%,0,N59°3.473' E13°3.605',60.70,2009-09-16 10:39:35,,,$
%,0,N59°3.452' E13°3.467',56.37,2009-09-16 10:42:49,,,$
The regex pattern stops at newline instead of matching until the end of file. I've tried the m modifier with no luck...
Example:
print MYFILE /^(%,0,.*)/ms
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.