in reply to Looking for some assistance in cleaning up a perl script

If that script were 20-40 lines, posting it here (not as a NON-linking URL -- see Markup in the Monastery -- at pastebin) would be appropriate.

Since it's 80-some lines, you'd do better to pick a section about which you're particularly concerned, to post (as a runnable snippet) here.

We're here to help you learn; not to provide free programming services*1, which is fundamentally what you've asked for. See On asking for help and the other basic Q&A in PerlMonks FAQ.

One direct comment: You start out using numeric values ($countf=0;) for example, but then proceed to use an alpha test, ge, on $countf at line 56, and revert to a numeric test in 59.

Perl's DWIM factor will often save you from goofs like that... but you can't count on it forever.

Update: Fixed some punct and quoted code.

*1 ...or -- for the next 20 minutes only -- take advantage of the special offer of free programming services (except for a modest $2k registration fee, taxes, shipping, handling and modest surcharges) at ww.inc. :-)

Update:

OP revised since answers started appearing leaving several to appear out of contest. Author has been advised that doing so removes context for several replies (including this one).
Original post included only a pastebin address for code, http://pastebin.com/P5mK7k5G (original was * NOT * a link) which was very different from what's now posted.

In that code, lines 54-59 read:

# Changes subject based on amount of files found, over 4000 will sugge +st a possible error. my $subject = ''; if ($fCount ge '4000') { $subject = '[POSSIBLE ERROR] Import has '.$fCount.' regular fi +les and '.$fCountL.' large files waiting to be processed!'; } elsif ($fCount < '4000') {

Thanks to planetscape for pointing this out.

Replies are listed 'Best First'.
Re^2: Looking for some assistance in cleaning up a perl script
by Anonymous Monk on Jun 22, 2011 at 23:56 UTC
    We're here to help you learn; not to provide free programming services

    Hmm, we've done code reviews in the past, up to 1000 lines