my $Path = $_[0];
return "" if(not $Path or not -f $Path);
I am going through a perl file and not able to understand what the -f option means
What does not -f mean ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
-foperator tests whether its operand is a regular file, rather than a directory, a symbolic link, or another special file.All operators starting with a
-are called file test operators and are usually found in shell-scripting languages as well. They are unary operators (taking just one operand), like!or~are unary operators.