Perldoc: No documentation on perl found [newbie]

  • Thread starter Shashank Khanvilkar
  • Start date
S

Shashank Khanvilkar

Hi,
Whenever i do
%>perldoc -f foreach
I get the following message
No documentation for perl function `foreach' found

Are there any environment variables that I need to set for perldoc to
finc the documentation? or am i doing something wrong?
ANy help appreciated.
Shashank
 
A

Arndt Jonasson

Shashank Khanvilkar said:
Whenever i do
%>perldoc -f foreach
I get the following message
No documentation for perl function `foreach' found

Are there any environment variables that I need to set for perldoc to
finc the documentation? or am i doing something wrong?

'foreach' is not a built-in function, so "perldoc -f" doesn't find it.
You can read about it in the syntax chapter: "perldoc perlsyn".

I don't know if there is an easy way to get there just knowing the
word "foreach".
 
C

Chris Mattern

Shashank said:
Hi,
Whenever i do
%>perldoc -f foreach
I get the following message
No documentation for perl function `foreach' found

Are there any environment variables that I need to set for perldoc to
finc the documentation? or am i doing something wrong?
ANy help appreciated.
Shashank

Your basic problem is that foreach is not a function. It's a keyword
for a looping construct. So -f isn't going to find it. Try perldoc
perlintro and search for "foreach".

--
Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"
 
A

A. Sinan Unur

'foreach' is not a built-in function, so "perldoc -f" doesn't find it.
You can read about it in the syntax chapter: "perldoc perlsyn".

I don't know if there is an easy way to get there just knowing the
word "foreach".

One can always look in the table of contents:

perldoc perltoc

Sinan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top