OK, there is a chance I'm just tired and missing something obvious, but this is very strange:
c:\blah> dir
07/10/2008 08:45 PM <DIR> 16
07/10/2008 08:45 PM <DIR> 17
07/10/2008 08:24 PM <DIR> 18
07/10/2008 08:45 PM <DIR> 19
19/03/2009 09:44 AM <DIR> 20- Foo bar bat
30/10/2008 10:25 AM <DIR> 21 Baz bat qux
07/10/2008 08:45 PM <DIR> 22- Shiver me timbers
...
c:\blah> perl -e "for (glob '*') { my ($id) = /
(\d+)$/ || /^(\d+)/; print \"$_ => id=$id\n\"; }"
Prints nothing, but CREATES A FILE called 'id' with content:
16 ==1
17 ==1
18 ==1
19 ==1
20- Foo bar bat ==20
21 Baz bat qux ==21
22- Shiver me timbers ==22
23 ==1
...
What is going on here?
Infos: perl, v5.8.8 built for MSWin32-x86-multi-thread, Binary build 816 [255195] provided by ActiveState
The zeroeth step in writing a module is to make sure that there isn't already a decent one in CPAN. (-- Pod::Simple::Subclassing)
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.