Ok I understand this but why the need for enclosing the function call in
().

Thanks for the info.

Paul

-----Original Message-----
From: Jenda Krynicky [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 07, 2003 9:38 AM
To: [EMAIL PROTECTED]
Subject: Re: Stat() - Getting one element


From: "Paul Kraus" <[EMAIL PROTECTED]>
> What's an easy way to grab just one element out of a function that 
> returns a list.
> 
> For instance if I was to stat a file and all I wanted was the $atime 
> or if I just wanted the three timestamps atime mtime and ctime. 
> Thanks.

$atime = (stat($file))[8];

($atime, $mtime, $ctime) = (stat($file))[8,9,10];

HTH, Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to