MacPerlMan to the rescue!
Ouchy! While that other guy's solution is OK (I guess), you're missing out on alot o' Mac specific data. Also, if you get involved with the date returned above, it'll be seconds since th UN*X epoch which you're not really interested in on any Mac System. Solution: use Mac::Files or Mac::MoreFiles (I didn't name them and remember "or" is not mutually exclusive). Here's some quick code to give you the idea (read the PODs on Mac::Files at least, though).
use Mac::Files; #along with strict and -wT my $file="AgentM\'s Rockin\' G4 Cube:Desktop Folder:FileSupafly"; my $cat=FSpGetCatInfo($file); #throw in some dies along here my $fileinfo=$cat->ioFlFndrInfo(); print $filecat->ioNamePtr(), ' ',$fileinfo->fdCreator(); #prints filen +ame and its 4 letter creator type
These modules also include numerous (read "gazillions o' ") constants that help you toy with the filesystem: comments, resource stuff, etc. This was just a striptease of what these modules are really capable of: file locking, resource editing, directory info, etc. I, too, realize that the PODs are all too often inadequate but I take what I can get- including the MacPerl book which you can get anywhere online.

Please- while using MacPerl, keep you tray table up and your seat in the upright and locked position. Thank you.

AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.

In reply to Re: Question about reading the Mac filesystem by AgentM
in thread Question about reading the Mac filesystem by curtisb

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.