in reply to A pretty simple perl script..

I'm far from an expert, but I see lots of problems here. First, it'd be helpful if you were to tell us how the code is failing, not just that it's failing. Are you getting an error or just incorrect output?

@ARGV = <$LOGDIR/*.log>;
Not sure why you're putting your file globbing results in @ARGV. The preferable way is to use the glob function. Personally, I'd do something like...
my @fileList = glob($LOGDIR/*.log); while (@fileList) { ... }

s/L//;
Are you sure you want to remove all 'L's? What if someone's name has an 'L' in it? How about...
s/^L\s+//;

You should always try to use strict too.

I hope I don't come across as overly harsh, but this script needs some cleaning up. There are many more issues. These are a few that jumped out at me right away.

Replies are listed 'Best First'.
Re^2: A pretty simple perl script..
by GrandFather (Saint) on Mar 30, 2006 at 21:48 UTC

    Actually the code only removes the first 'L' on the line. A /g flag is required to remove them all.


    DWIM is Perl's answer to Gödel