OK,....I have found out why,...Its all because of wondeful Microsoft.

It seems that - well according to M$ - some of our .doc and .xls files were created in the year 1850, 1745 and others in the sixteenth century!!! very impressive isn't it? Anyway, a Microsoft rep has been summoned to come here at once and explain as to why is this….hehehehehe

I am glad that yet again with the use of Perl and the help of PerlMonks I have managed to uncover another outrage from M$... I have been gloating all day about Perl and I love it. :-D

VIVA PERLMONKS,…here here.

BTW : This is my final code with error checks of some sort.
use strict; use File::Find; use File::stat; use File::Spec; use Time::localtime; system("cls"); my $start_time = ctime(); print "\nStart Time: $start_time\n\n"; print "Full Path,Size (Byte),Created,Modified,Accessed,File Name,Type\ +n"; find(\&stat_files, @ARGV); sub stat_files { return unless -f; my $sb = stat ($File::Find::name); my $size = $sb->size; my $ct = localtime $sb->ctime; my $mt = localtime $sb->mtime; my $at = localtime $sb->atime; my $creation_time; my $modified_time; my $accessed_time; eval {$creation_time = $ct->mday()."/".($ct->mon()+1)."/".(($ct->y +ear)+1900);}; $creation_time = '-' if $@; undef $@; eval {$modified_time = $mt->mday()."/".($mt->mon()+1)."/".(($mt->y +ear)+1900);}; $modified_time = '-' if $@; undef $@; eval {$accessed_time = $at->mday()."/". ($at->mon()+1)."/".(($at-> +year)+1900);}; $accessed_time = '-' if $@; undef $@; my ($volume,$directories,$file) = File::Spec->splitpath($File::Fin +d::name); my $ext = $file; $ext =~ s/.+\.(.+)$//; $File::Find::name =~ tr/,/-/; print "$File::Find::name,$size,$creation_time,$modified_time,$acce +ssed_time,$file,$1\n"; } my $end_time = ctime(); print "\nEnd Time: $end_time\n";
Thanks a lot guys

*******UPDATE***********

And thanks for the -ve points,...Huh!

Blackadder

In reply to Re^3: I am really stuck here....PLEASE HELP. by blackadder
in thread Invalid File Handle??? by blackadder

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.