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.