CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
-e and -s switches?

 



kicsihun
New User

Aug 19, 2009, 5:13 AM

Post #1 of 4 (399 views)
-e and -s switches? Can't Post

Hi! I'm trying to understand a perl script. There are some switches (I guess) used, and I can't seem to find their role/use.
The code looks like:
my $filename ="doc";
my $filename1 = -s $filename;
while( -e $filename && $filename1 == -s $filename )

What is the role or use of -e and -s?

Thanks


vinodkaushik
Novice

Aug 19, 2009, 5:21 AM

Post #2 of 4 (398 views)
Re: [kicsihun] -e and -s switches? [In reply to] Can't Post

following is the description of these switches.

-s : File is a socket
-e : File exists.


FishMonger
Veteran / Moderator

Aug 19, 2009, 7:22 AM

Post #3 of 4 (394 views)
Re: [vinodkaushik] -e and -s switches? [In reply to] Can't Post

-s (lowercase)
-s File has non-zero size (returns size).

-S (uppercase)
-S File is a socket.


kicsihun
New User

Aug 19, 2009, 7:59 AM

Post #4 of 4 (391 views)
-e and -s switches? [In reply to] Can't Post

Thanks a lot! WinkSmile

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives