[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Slightly OT :perl file exists test
On Wed, May 12, 2004 at 01:24:47PM +0100, Alex Hudson wrote:
> On Wed, 2004-05-12 at 13:09, Chris Johnson wrote:
> > Is there any benefit to using -e (file exists ) over -f (file is a plain
> > file (what is a plain file?)?
>
> Yeah, they do different things - -e is 'any type of file exists'. -f
> means is a plain file, as opposed to device file, or pipe, or similar
> strange thing. Most files are plain files ;)
In particular, -f is false if the 'file' is a directory.
--
print+qq&$}$"$/$s$,$*${d}$g$s$@$.$q$,$:$.$q$^$,$@$*$~$;$.$q$m&if+map{m,^\d{0\,},,${$::{$'}}=chr($"+=$&||1)}q&10m22,42}6:17*2~2.3 [at] 3;^2dg3q/s"&=~m*\d\*.*g
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.