[Nolug] Perl Question

From: John Souvestre <johns_at_sstar.com>
Date: Thu, 31 May 2007 21:49:59 -0500
Message-ID: <001a01c7a3f7$8ba6c300$0a01010a@JohnS>

Hi.

I'm trying to figure out a Perl script. One line in it has me baffled.

I believe it is intended to extend a filename till it is unique. But I don't
quite grasp the syntax.

 $filename .= rand(10) while (-f "$filename.tmp") || (-f "$filename.sub");

Is this a shorthand way of writing a "do while" loop?

And what does the "-f" do?

Thanks!

John

    John Souvestre - Southern Star - (504) 888-3348 - www.sstar.com

___________________
Nolug mailing list
nolug@nolug.org
Received on 05/31/07

This archive was generated by hypermail 2.2.0 : 12/19/08 EST