New to programming. Portable code. Perl or Java?
Historically, programs have been operating system dependent with a distribution that runs on (say) Windows NT not being suitable for use on Solaris. Or, in current operating systems, an XP distribution being unsuitable for Linux or OS X.
This has changed somewhat with more modern languages such as Java and Perl, but the "model" of how this works - and thus the ideal application - differs between the two.
HOW ARE PERL AND JAVA PORTABLE?
Java code runs in a virtual machine - a piece of software that is operating system dependent which provides an environment in which a system independent distribution can run. You'll need to install a "JRE" (Java Runtime environment) that includes this virtual machine on any system on which you want to run Java, or use a JVM that's supplied as part of something else such as certain browsers before you can run Java on a computer.
Java provides device independence by working at a level above the operating system, so it is NOT an ideal language for system admin, backup scripts and similar utilities. It's great for larger "OO" projects that run for months or years, with teams of programmers working together.
Perl can run on all major operating systems. In order for a Perl script to run on a computer, a version of Perl specific for the operating system must be installed (just like Java needs a JRE). Once Perl is installed, the same distributions should be able to run on any platform if the code was written suitably.
The vast majority of Perl code *is* portable. I've quite happily written code without even thinking about the target OS, and all our training examples work on Windows, Linux, OS X and Solaris quite cheerfully. In practice, Perl is very "Unix like", but where something's required that is of necessity operating system dependent, the Windows implementation (for example) mimics the Unix behaviour and does what we describe as the "moral equivalent". In that way, Perl code will typically run cross platform in a far wider range of applications than Java which simply cannot do certain things practically.
A warning - it IS possible to write operating system dependent Perl; if you say "run the following OS command" and ask it to run something that doesn't exist on some OS, then it's bound to fail. But Perl scripts aren't accidentally written like this, and can check.
CAN I LEARN TO PROGRAM IN PERL / JAVA AS MY FIRST LANGUAGE?
Yes, and knowledge gained of one will make learning the second easier. We're quite used to running "learning to program in Perl" and "learning to program in Java" courses - and the way we teach newcomers to programming is different to the way we teach people who are converting from other languages.
Having said that, both Perl and Java have a huge range of facilities and neither is the easiest of languages for the newcomer ... but then you end up being able to do really useful, portable things after your course.
VISIBILITY OF PERL AND JAVA
You'll see a lot more information around about Java and you'll feel that it's a much more popular language. It probably does have a bigger user base (see my comments earlier about how great it is for huge applications), but it's also been very much over sold by its originators who push it perhaps wider than they should.
Perl is an Open Source language. It's not really sold but has enthusiastic advocates who, however, will tell you its strengths and also its weaknesses - they have no income to make from overselling it. Thus it's a bit of a "hidden secret" compared to Java.
See also Courses for newcomers to programming
Please note that articles in this section of our
web site were current and correct to the best of our ability when published,
but by the nature of our business may go out of date quite quickly. The
quoting of a price, contract term or any other information in this area of
our website is NOT an offer to supply now on those terms - please check
back via our main web site
Web Application Deployment - The Components of a Web-Based Solution 
The components of an Apache httpd / Tomcat / MySQL stack and what each does - (2012-10-13) 
LAMP - Linux, Apache, MySQL, PHP - install, configure, administer - (2010-07-30) 
Should I maintain the programming code on my own website? - (2009-03-23) 
PHP / Web 2 logging - (2008-01-06) 
Apache, Tomcat, Jakarta, httpd, web server - what are they? - (2007-07-13) 
From Web to Web 2 - (2007-05-21) 
A pu that got me into trouble - (2007-05-04) 
The LAMP Cookbook - Linux, Apache, MySQL, PHP / Perl - (2006-11-13) 
Helicopter views and tartans - (2006-04-06) 
Dynamic Web presence - next generation web site - (2005-11-29) 
How far away is that server? - (2005-09-10) 
FTP - how to make the right transfers - (2005-09-01) 
Ajax - (2005-07-03) 
Acronyms - (2005-01-02) 
Business is the predominant user of Tomcat, Perl and Tcl - (2004-09-15) 
Linux / LAMP course - (2004-08-31)Choosing your language 
Programming languages - what are the differences between them? - (2012-06-27) 
Shell, Awk, Perl of Python? - (2012-06-14) 
Ruby v Perl - a comparison example - (2012-02-21) 
Python or Lua - which should I use / learn? - (2011-12-21) 
Rekeying a table - comparison in #Ruby #Perl and #Python - (2011-02-14) 
Ruby - how does it compare and where is it the right language? - (2010-07-11) 
The same very simple program in many different programming languages - (2010-03-31) 
All the Cs ... and Java too - (2009-12-13) 
When should I use Java, Perl, PHP, or Python? - (2009-12-13) 
Admission - (2009-11-19) 
Learning to program in PHP, Python, Java or Lua ... - (2009-02-19) 
I have not programmed before, and need to learn - (2009-01-19) 
Speaking all the languages - (2009-01-12) 
Learning to program in - (2004-10-07)Web Application Deployment - Java - Basic Language Overview 
What is a JVM, a JRE, a JDK - components of the core Java Environment - (2009-09-26) 
Java on the Web Server - course for delegates with some prior Java experience - (2009-04-06) 
Java oversold? - (2006-09-19) 
Web Application Components - (2006-03-28)Perl - Introduction 
Are you learning Perl? Some more examples for you! - (2010-06-27) 
What is Perl? - (2010-06-15) 
Converting to Perl - the sort of programs you will write - (2009-03-08) 
Perl and Blackberries - (2008-10-23) 
Perl v PHP, choosing the right language - (2008-08-14) 
Q - Should I use Perl or Python? - (2008-07-23) 
The LAMP Cookbook - Linux, Apache, MySQL, PHP / Perl - (2006-11-13) 
Is Perl being replaced by PHP and Python? - (2006-08-27) 
How to debug a Perl program - (2006-06-04) 
Testing you Perl / PHP / MySQL / Tcl knowledge - (2006-04-19) 
Choosing the right language - (2006-03-01) 
Perl - multiprocess applications - (2006-02-13) 
Twice is a co-incidence and three times is a pattern - (2006-02-07) 
Learning to program in Perl or PHP - (2006-01-26) 
Central London Courses - Perl, PHP, Python, Tcl, MySQL - (2005-07-18) 
Programming languages - a comparison - (2005-05-20) 
Release numbers - (2004-08-23)resource index - Deployment
Solutions centre home page
You'll find shorter technical items at
The Horse's Mouth
delegate's questions answered at
At Well House Consultants, we provide
subjects such as Ruby, Lua, Perl, Python, Linux, C, C++,
Tcl/Tk, Tomcat, PHP and MySQL. We're asked (and answer)
many questions, and answers to those which are of general
interest are published in this area of our site.