I have several Perl related problems.

The biggest one is that I only use Perl sometimes. I am a W2K admin by day and FreeBSD/OS X (no, really, two separate boxes) user by night. At work on W2K sometimes a simple .bat file is all the problem needs, other times there is some (God awful) GUI way to get things done. My network runs fairly smoothly and I like it like that. I don't always have the time to "figure it out" with Perl. Later I often try to implent a Perl(y) solution which brings us to my second biggest problem:

I can't find anything.

This is huge. This is how I get frustrated and look for a "faster" solution. For instance the other day I wanted to open a directory look at some files and move them based on their age. I figured I'd keep today's and yesterday's files and move the rest every few days with an AT job (like cron only really crappy,) so I needed to figure out how to tell Perl to read and process the files by date.

I figure I have to use File::Copy so I know I have that module but I double check with perldoc File::Copy. Perfect. I go to CPAN and go mucking around for some module to help. I have no idea what I am asking though and through some dumb luck I find File::Backup which is a really cool looking module that deals with logfiles but:
C:\Lou\Code>ppm PPM interactive shell (2.2.0) - type 'help' for available commands. PPM> install file::backup Install package 'file-backup?' (y/N): y Installing package 'file-backup'... Error installing package 'file-backup': Read a PPD for 'file-backup', +but it is not intended for this build of Perl (MSWin32-x86-multi-thre +ad) PPM> exit Quit!
Fine! There's more than one way to do it; right? So I check perldoc, come here, I go to Google, I check The Perl Cookbook (both my online & my physical copy) and Perldocs.com but I cannot find a way to process a file by the date.

Now, look, I know what you're thinking (perhaps muttering to your screen) "What a dimwit!" I'm with you! Perl has done nothing wrong. I'm a bonehead. I've probably DONE this before. I can't seem to ask perldoc the right questions. I'm never sure when to use -q or -f so I end up trying both. I guess the problem is that no matter how many times I perldoc perldoc I can't get it straight.

I am filled with shame

PS - I just ended up manually moving the files.
--
ellem@optonline.net
There's more than one way to do it, but only some of them actually work.

In reply to I can't find anything by ellem

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.