Posting as a new subject, as this doesn't really relate to the last subject I was asking about, even though it's the same code

Alright, I'm trying to get the date to be human readable... I figured the best thing for this is Date::Manip, however, I can't seem to get the filestat information into the datemanip...
foreach my $farm (@farms) { my @fileStat = stat($farm); printf "%s: Age [%s], size [%d]\n", $farm, &ParseDateString("epoc +h $s->mtime()"), $s->size(); } # end of foreach statement
I've tried a couple things, but nothing I try seems to work...

here's the entire script so far:

#!/usr/bin/perl use strict; use File::stat; use Date::Manip; # This is a program that is intended to allow FEP operators # a tool that will facilitate in monitoring incoming transmissions # and preprocessor logs. #------------------- Define Subroutines ------------------# # # # Main is a subroutine simply written for flow control sub Main { my $corp = $_[0]; print "Input:\n"; farmInput($corp,'input'); } # end Main # farmInput does a wildcard search of all /usr/local/farm/*/*/input fo +lders # looking for the <STDIN> corp number and printing those files to scre +en. sub farmInput { my $corp = $_[0]; my $finalPath = $_[1]; my $path = "/usr/local/farm/*/*/$finalPath/*$corp*"; my @farms = glob($path); foreach my $farm (@farms) { my $s = stat($farm); printf "%s: Age [%s], size [%d]\n", $farm, &ParseDateString("epoc +h $s->mtime()"), $s->size(); } # end of foreach statement } # end farmInput #------------------- End Subroutines ---------------------# print "What corp are you looking for? " ; chomp(my $whatWeWant = <STDIN>); Main($whatWeWant);
I'm trying to streamline it as I go, I know that in the farmInput subrouting I could put the $corp and $finalPath variables on the same line, just haven't gotten to that yet... I'd like my code to be as small and clean as possible... but it needs to work first! ;o)

In reply to Human Readable Date by FireyIce01

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.