View Full Version : perl command
cgibie
03-03-2006, 07:46 AM
Just curious, when you guys said that type the command -perl stuff like that, where you guys do that? is that cmd? or my laptop has to support cgi in order to run that?
FishMonger
03-03-2006, 08:33 AM
Your question doesn't make any sense. Please rephrase your question.
cgibie
03-03-2006, 07:47 PM
Fishmonger, I took a quote from you:
Run these to commands.
perldoc -f printf
perldoc -f sprintf
You mean in the command line on comand prompt or you refer that to website? :)
FishMonger
03-03-2006, 08:05 PM
They are run from the command line, e.g.
C:\>perldoc -f printf
printf FILEHANDLE FORMAT, LIST
printf FORMAT, LIST
Equivalent to "print FILEHANDLE sprintf(FORMAT, LIST)", except
that $\ (the output record separator) is not appended. The first
argument of the list will be interpreted as the "printf" format.
See "sprintf" for an explanation of the format argument. If "use
locale" is in effect, the character used for the decimal point
in formatted real numbers is affected by the LC_NUMERIC locale.
See perllocale.
Don't fall into the trap of using a "printf" when a simple
"print" would do. The "print" is more efficient and less error
prone.
C:\>
You can also do a google search for 'man printf'.
Here are 2 example sites.
http://unixhelp.ed.ac.uk/CGI/man-cgi?sprintf+3
http://www.die.net/doc/linux/man/man3/sprintf.3.html
cgibie
03-03-2006, 09:26 PM
Hm... how did you do that to get that C:> Is it a software or the command prompt in windows supports perl? I bet not. Do I have to install anything to run that?
FishMonger
03-03-2006, 10:00 PM
It's the Windows command prompt, and C:\ is the root of my hard drive. Do you know how to open a command prompt?
http://www.c3scripts.com/tutorials/msdos/
That web page demonstates opening a "DOS window". For the command prompt, use cmd instead of command.
http://www.computerhope.com/cmd.htm
cgibie
03-04-2006, 12:20 AM
OH yeah I know how to open command prompt but when I typed perldoc -f printf, it does not recognize that perldoc... so I assume I must have download something else...
FishMonger
03-04-2006, 12:48 AM
perldoc is a command that comes with Perl, so you need to have Perl installed and the perl bin directory needs to be in your path environment
vietboy505
03-05-2006, 10:12 PM
cgibie,
you need to install ActivePerl if you want to run on Windows
active perl (http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.