Quiz Page perl The perl quiz has changed! We have replaced perl questions with answers! And from those answers you'll find further links to even more information - forums where you can ask questions, training courses, longer articles, and more. [link to quiz index] ...
If you really want the old quiz
questions, you can find them
here,
here,
here and
here ... and
with onward links to the possible answers to each question too.
Moving the product forward - ours, and MySQL, Perl, PHP and Python tooI have just posted a "steady as she goes" message, welcoming the new decade but reassuring our customers that we're carrying on offering very much the same high quality courses, and the same high ...
Perl and the Common Gateway Interface - out of fashion but still very useful?Is the Common Gateway Interface dead? No - it isn't; although my first choice for a new web application these days would be something else (PHP, Java with Servlets, JSPs or a derivative, Python with ...
When should I use Java, Perl, PHP, or Python?Java is a good language for bigger systems ... teams of programmers writing bits of code that interact with each other. In fact, Java is so well tuned towards the bigger systems that it's not the ...
Making executable binaries in Python (or Perl)In a nutshell, translations of any of the scripting / semi-scripting languages into executables require the libraries that are included with the base distribution to be included with them, so they ...
Variable storage - Perl, Tcl and Python comparedFrom Monday to Wednesday, I was teaching Python to a group of delegates at a company where I have previously taught Tcl and Expect and Perl. And this interesting diagram shows just what a contrast ...
Operator overloading - redefining addition and other Perl tricksWhat does addition actually mean? It means different things depending on what you're adding together, and in Perl you can redefine additions - and other operators - on objects of types which you ...
But I am reading from a file - no need to prompt (Perl)If you're writing a script that calls for user input, you had better prompt the user ... otherwise, the terminal / window will appear to hang and the user won't know what's going on. However - if ...
Automated Browsing in PerlI'm reminded on today's Perl course just how powerful some of the modules are, and how much you can do in so little code.
LWP::UserAgent turns your Perl into an automated browser .. the following ...
Firefighting with PerlIf the building is blazing, you'll go right ahead and put the fire out with the extinguisher. Hopefully you'll have been trained to use the right sort of extinguisher on the right fire, but you won't ...
Giving up on user input - keyboard timeout in PerlThere's an old piece of code that I've used to demontstrate how (in Perl) you can prompt for a user input ... but then time out the input on an alarm signal if the user doesn't enter data within a ...
Making variables persistant, pretending a database is a variable and other Perl tricksHave a look at this Perl program:
use fyle;
tie $counter,"fyle";
$counter = $counter + 1;
print ("This is access no. $counter\n");
Apart from the rather curious module loaded at the top, this ...
Handling XML in Perl - introduction and early examplesThere are hundreds of modules (literally) in Perl for handing XML. Some of them are highly specialised, but others are of much more general use in reading (and in some cases writing) XML streams.
...
Long job - progress bar techniques (Perl)Here's a "Perl for Larger Projects" example --- for use in illustrating the "advanced file and directory handling" and "handling huge data set" modules.
Scenario ... I want to go through all the ...
Designing your data structures for a robust Perl applicationWhatever language you're programming in, design of your data structures is important. You should consider such design ahead of time, and before you start to code - "What am I going to be doing with ...
Lead characters on Perl variable namesPerl variable names mostly start with a special character:
$ for a scalar variable - that's a variable that can hold an integer, a float, a string, a reference, or a compiled regular expression (that ...
Ternary operators alternatives - Perl and Lua lazy operators"If the gender is male, the answer is him, but if the gender is female, the answer is her". A common situation in programming - [is/are], [him/her], [yes/no], [child/children], [ice/water/steam], ...
Uploading and Downloading files - changing names (Perl and PHP)When you are uploading a file to a server via http (in Perl or PHP), where is the file saved, and what is it called? And when you download a file, where is it saved on your local disc, and what name ...
Extracting real data from an exported file in PHP or Perl"Just give me the data". Where there's a requirement to take data from another program into a Perl or PHP script, it's often easier simply to take the data in a format that it's offered / exported ...
Changing a variable behaviour in Perl - tieingWhat can you do with a scalar variable? When you reduce it to lowest level programming principles, not a lot ... you can create it, destroy it, save a value into it, and read a value back from it. ...
So what is this thing called Perl that I keep harping on about?"An overview of the Perl Language"
It almost sound like one of those dreaded school essays that I had to write in my several attempts to get an English "O" level (they were the things that came ...
Perl references - $$var and \$var notationsIn Perl, if I write:
$stuff = "Porridge";
then I'm setting up a variable to contain the value "Porridge".
If I write:
$stuffat = \$stuff;
then I'm setting up a variable to contain the ADDRESS OF the ...
Handling nasty characters - Perl, PHP, Python, Tcl, LuaAre your writing or maintaining a web based application that uses forms? If so, you have better be aware of some of the nasty characters that are around!
The < character, when echoed back from a ...
Sending awkward characters by email in PerlCarrying on from the email work I described in a recent article, I wrote an example today in Perl where I used the mailx program to send an email, piping to it in a system call via an echo.
For a ...
Loading external code into Perl from a nonstandard directoryHere's a piece of Perl code that loads in an external module.
push(@INC, "/var/opt/OV/bin/OpC/monitor");
eval { require "monitor_utils.pm"; };
if ($@) {
print STDERR "could not load ...
Transforming data in Perl using lists of lists and hashes of hashesIn Perl, you don't have conventional two dimensional arrays - you have lists which are single dimensional only. However, you can have a list that contains a reference to another list, in effect a ...
Do not re-invent the wheel - use a Perl module"If you think 'surely someone has done this before', you're probably right ... and in Perl, you'll find the resource you need available as a module on your system, or if it's not quite to common, on ...
Revision / Summary of lists - PerlWe've started the third day of this week's Perl course with a revision of some features of lists ... posting here as there are some useful reminders (and I came back later to add more comments!)
# ...
Configuring httpd, or Tomcat, to run CGI scripts in PerlHere's a Perl / CGI script - a "Common Gateway Interface" program that I want to run on my web server, and access via my browser. What server to I need to run it on, and how do I set that server up?
...
Keyboard reading in Perl - character by character not line by lineIf I'm typing in my age in response to a prompt and I start with a "6" character, will you assume that I'm between 60 and 69 years old? You might ... but then I may backspace (having accidentally ...
Nothing beats Perl to solve a data manipulation requirement quicklyOK - I admit it. It might be slightly out of fashion but I still love Perl for that quick hack script which is a one-off data manipulation need.
I have two files - the first containing records of ...
Weekday or Weekend PHP, Python and Perl classes?Should we run training courses during the week, or at weekends?
Our 'traditional' business has been 80% + employees of companies, government organisations and educational establishments who have ...
Converting to Perl - the sort of programs you will writeI've put many of the examples that I wrote during last week's Perl Course into our converting to Perl resource, and they've available for use and download from there, subject to the usual "use at your ...
Efficient calls to subs in Perl - avoid duplication, gain speedWhen you call a sub in Perl (a subroutine - a named block of code), you pass in a list of parameters in the list called @_. It's easy and straightforward ... but as the length of your list ...
Perl - lists do so much more than arraysopen (FH,"ac_20090225");
@stuff = <FH>;
@interesting = grep(/horse/i,@stuff);
print @interesting;
In Perl, an @ in front of a variable makes it into a list - and a list variable has the advantages ...
Small Web Server in PerlI would not encourage you to write your own web server in Perl, but I might suggest that you used the http protocol as a convenient intersystem communication protocol ... and that might result in you ...
Discount Training Courses - PHP, Perl, PythonHere's an email I wrote in answer to a request for a discount earlier today.
Many training companies quote high(er) prices, with the full anticipation that they can offer a wide range of discounts to ...
Best source to learn Java (or Perl or PHP or Python)An impossible question - there is no best way - yet it's one that I'm asked from time to time. [["Hello. I'm doing a b.tech. My friends like ur site very much. Plz help us in Java programming - plz ...
Whisky - Setting and reading cookies from PerlFancy a Whisky - if you click on this link, our barman will choose a glass of whisky at random for you, and give it you on the house. Once you're hooked and secured as a customer, he'll sell you ...
Perl substitute - the e modifierHere's a graphic illustration of the use of the "e" for "execute" modifier used on the end of substitute operation in Perl.
The "s" for substitute allows you to replace a matched pattern with a ...
Variable Types in PerlIn Perl, you have "autovivification" where variables are created when they have a values set in them, without the need to declare them. Some authorities will tell you that they are also "autotyped" ...
|
|