Perhaps the more idiomatic way to do what you want
would be:
use strict;
my $directory = shift;
chdir $directory or die "Unable to change to directory: $!\n";
while (<*>) # this automagically loops through the current dir
{
# I think you're trying to get last accessed date
print -A, "\n" if /^c/;
}
hth,
Maurice Reeves
buzzcutbuddha www.perlmonks.org
>From: COLLINEAU Franck FTRD/DMI/TAM
><[EMAIL PROTECTED]>
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>Subject: Stat function
>Date: Mon, 10 Dec 2001 11:08:10 +0100
>
>Greetings,
>
>I have the following code:
>
>opendir (INFO,"l:/01_informatique") || die " impossible d'ouvrire le
>r�pertoire 01_informatique: $!";
>
>while ($fic=readdir INFO)
>{
> if($fic=~/^c/)
> {
> @date=stat($fic);
> print "$date[7]\n";
> }
>}
>close INFO;
>
>
>There is nothing in the screen !
>
>Best regards,
>
>Franck
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]