Q. How do I find out my IP address assigned to eth0 or ra0 interface using perl? A. If you need to know the IP address of the UNIX / Linux machine you are running on, use the following perl one liner. Perl don’t have any inbuilt facility but combination of ifconfig command ans shell […]


Q. I need Perl programming language to run scripts. How do I install perl on FreeBSD operating system? A. Practical Extraction and Report Language or Perl can be installed using FreeBSD ports or binary package system. Perl is a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports […]


Q. I’m new to Linux and Perl. I’ve printed perl man page but it is bit confusing and omits a lot of simple things or details. Can you tell me how do I write a perl script? How do I open perl editor? A. Larry Wall began work on Perl in 1987 and it is […]


Q. How do I find out RAM size / memory size in FreeBSD? How do I display amount of free and used memory in the system? A. To displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel you need to […]


Q. I’m currently learning Perl cgi programming and coded a small web site in a Perl. Usually errors are logged in a log file. How can I view the perl cgi errors in a we browser like firefox? A. CGI scripts have a nasty habit of leaving warning messages in the error logs that are […]


How do I read or display command-line arguments with Perl?


How do I use sprintf() function in a perl script under Linux or UNIX?