Archive for Perl Tutorials

Python

A popular, object-oriented scripting language used for writing system utilities and Internet scripts. Python’s design is notably clean, elegant, and well thought through. It can used for different types of softwares development. Python offers a strong support for inregation with other languages and tools & comes with extensive standard libraries.

Python runs on Windows Servers, Linux Servers /Unix Servers, Mac OS X, OS/2, Amiga, Palm Handhelds, and Nokia mobile phones. Python has also been ported to the Java and .NET virtual machines. Python is distributed under an OSI-approved open source license that makes it free to use, even for commercial products.

Site: http://www.python.org

Documentaion: http://www.python.org/doc

Related Posts:

  • No Related Posts

PEAR

PEAR is a framework and distribution system for reusable PHP components. is short for “PHP Extension and Application Repository” and is pronounced just like the fruit. The purpose of PEAR is to provide ‘a structured library of open-sourced code for PHP users’, ‘system for code distribution and package maintenance’, ‘standard style for code written in PHP’, ‘the PHP Extension Community Library’.

Pear Group: The PEAR Group is the governing body of PEAR.

Site: http://pear.php.net/

Manual: http://pear.php.net/manual/

FAQ: http://pear.php.net/manual/en/faq.php

Support: http://pear.php.net/support

Pear Packages: http://pear.php.net/packages.php

Related Posts:

  • No Related Posts

The server encountered an internal error or misconfiguration

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@server.eukhost.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

If you are getting above error after installing perldesk then the installation is missing some perl modules. Just copy and paste following lines on the server to install missing perl modules.

perl -MCPAN -e ‘install MIME::Tools’
perl -MCPAN -e ‘install DBI’
perl -MCPAN -e ‘install DBI::MySQL’
perl -MCPAN -e ‘install Digest::MD5′
perl -MCPAN -e ‘install DBD::MySQL’

Other way Around is below :-

METHOD 2
Step A) Download the tar.gz file from search.cpan.org after locating the module
needed
Step B) Untar the file by typing ‘tar zxvf filename’
Step C) Run the installation, first ‘cd’ to the installation directory and run the following
steps:
perl Makefile.pl
make
make test
make install
The above would install the module in the root Perl lib directory, if you would like to
install it elsewhere or don’t have access to install it at root level simply specify the
directory by using the PREFIX option when running the makefile, example below:
perl Makefile.pl PREFIX=/home/perl/my_module
If modules are installed in a directory other than the root perl installation you will need
to tell PerlDesk where to look for the modules. To do this, open the files listed below
and insert the line:
use lib ‘/home/perl/my_modules’;
In the following files:
./pdesk.cgi
./admin.cgi
./kb.cgi
./staff.cgi
./include/email.cgi

Related Posts:

  • No Related Posts

Perl upgrade on cpanel server

Hello,

To upgrade your perl on the Cpanel server you need to
fire below commands on the shell :

1. Firstly ,

wget http://layer1.cpanel.net/perl587installer.tar.gz
tar -vzxf perl587installer.tar.gz
cd perl587installer
./install

2. Secondly ,

/usr/local/cpanel/bin/checkperlmodules
/scripts/upcp –force

3. Thirdly,you should checkout the perl version after upgradation.
You can checkout the perl version through below command :

perl -v

Related Posts:

  • No Related Posts

Perl Program

A Perl Program

There are two main steps in running a Perl program:

  • Create a text file with the Perl commands you wish to carry out,
  • Run this file through the Perl interpreter,

It must be stressed that this file is a text (ascii) file. Word processors such as Microsoft Word are inconvenient to use for this purpose, as by default they save files in their own (binary) format. Life will be easier in your programming career if you start off with a text-only editor, such as emacs or xemacs.A simple Perl program that just prints out something to the terminal screen is

# file hello.pl (this is a comment)
print "Hello, world!n";

Note the trailing semi-colon at the end – this indicates to Perl the end of the command. Anything after the “#” sign is treated as a comment by the interpreter, and thus ignored. Generally spaces or line breaks are ignored by the interpreter – the above program could also be written as

print
"Hello, world!n"      ;

although for human eyes this is less readable.After creating this file, save it as, for example, hello.pl, and run it through the Perl interpreter (the “pl” extension is used in some contexts to indicate the type of file). Running it through the interpreter can be done through a terminal window as

C:> perl hello.pl

This assumes that perl is in your PATH environment variable.On Unix there is a shortcut you can use to run such programs. Modify the above file so that it includes a shebang line as the first line:

#!/usr/bin/perl
print "Hello, world!n";

This line will indicate to the shell that the program found as /usr/bin/perl will be used to carry out the commands that follow. On Unix it is often customary to name such files without an extension, so save this file, for example, as simply hello. After this, you can make the file executable by

bash$ chmod u+x hello

You can then run the file as

bash$ hello

If the current directory is not in your PATH environment variable, you would have to run this as

bash$ ./hello

Programming Elements
There are five basic elements of programming that are present in essentially all languages.

  • Variables: This will how data is represented. It can range from something very simple, such as the age of a person, to something very complex, such as a record of university students holding their names, ages, addresses, what courses they have taken, and the marks obtained.
  • Loops: This will allow us to carry out execution of a group of commands a certain number of times.
  • Conditionals: This will specify execution of a group of statements depending on whether or not some condition is satisfied.
  • Input/Output: This will allow interaction of the program with external entities. This might be as simple as printing something out to the terminal screen, or capturing some text the user types on the keyboard, or it can involve reading and/or writing to files.
  • Subroutines and functions: This will allow you to put oft-used snippets of code into one location which can then be used over and over again.

These notes are not meant to be an all-inclusive reference guide to Perl. You should become very familiar with the copious documentation that comes with Perl – on Windows, see the HTML links under the ActivePerl entry in the Start menu. You can also access the documentation within a terminal window via perldoc:

C:> perldoc perl        # brings up a table of contents
C:> perldoc perlintro   # introduction to Perl
C:> perldoc -f rand     # quick help on using the rand function
C:> perldoc File::Copy  # help on using the File::Copy module

Related Posts:

  • No Related Posts
« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »