Explore BrainMass

Explore BrainMass


    Developed in 1987 by a man named Larry Wall in order to make report processing easier, Perl is a family of programming languages, including most famously Perl 5 and Perl 6. Though it has gone through multiple revisions since its inception, it at heart a general purpose language, able to script for Unix systems at a higher level than C, etc. Some like to think of the name 'Perl' as an acronym -' Practical Extracting and Reporting Language'1, for example - yet it was simply chosen as it is a short word with positive connotations. Perl was almost called Gloria, after Wall's wife, but in the end Wall settled on PEARL, only to find such a language already existed, thus the unique spelling2.

    Larry Wall with a big mustache and glasses before a convention

    Larry Wall. Image Source: Wikimedia Commons

    Though it is not as low-level as the C family, Perl shares much of its structure with it, including its procedural nature. Syntactically, the brace-delimited blocks, control structure, expressions, variables, assignment statements and subroutines of Perl will also be highly familiar to one trained in C, as will the language's capabilities with AWK and sed. One rather unique features of Perl is that its variables must be prefixed with a symbol upon their declaration to show their type. The examples below show scalar and array variable declaration in Perl:

    my $scalar_variable;

    my @array_variable;

    Perl is especially useful in manipulating text files as these high-power text processing facilities allow it to operate past the arbitrary data-length limits many contemporary Unix tools are bound by.



    1. "perl(1): Practical Extraction/Report Language - Linux man page". Linux.die.net. Retrieved 2013-07-23.

    2. Richardson, Marjorie (1999-05-01). "Larry Wall, the Guru of Perl". Linux Journal. Retrieved 2011-01-03.

    The camel logo of the icon image was actually chosen by O'Reilley Media for their book Programming Perl but has since become heavily associated with the language and community. 

    © BrainMass Inc. brainmass.com May 28, 2024, 11:16 pm ad1c9bdddf

    BrainMass Solutions Available for Instant Download

    Perl: RNA Code

    The following code is written in the Perl programming language: $RNA = "AUGCGUAGAACAUAA"; @sequence = split(//,$RNA) What does sequence [3] equal? We next use the following code to define the variable $temp: $temp = scalar @sequence; What is the value of $temp? How many places will the regular expression /U[AG]A/

    UNIX Perl Script Parsing Census Data

    Hi, I need to write a UNIX Perl Script that parses column delimited census data for 2008. Since I cannot use newlines within this description I wrote the problem in Brainmass Problem Help.odt (let me know if there is any issues opening the .odt file). The census.txt attachment contains that data the script should parse. Thanks a

    Analysis of AJAX Application Model

    Is the Ajax application model really a good one for most software? Consider that, and the following quoted question, "Can an application model ever really be taken seriously which doesn't readily allow information storage on the local client or even access to your own software unless your Internet connection is working properly?

    PERL: Creating a Script that Process the Data

    New to PERL so I'm suppose to create a script that processes the data (name and number of hours worked during the month) submitted using an online form.The script calculates the number of weeks, days, and hours worked during the month, then displays the form data and the results of the calculations. I keep getting this compil

    Find command in Perl

    Unix provides users with a find command that can be used to locate one or more files. find / -name filename -type f 2>errorlog.txt I was told that Perl has a good find command. How to use it? How the result will be displayed? Using the command I should be able to locate a single file or multiple files. I am looking for

    Perl Script to List Files in a Directory

    I work in Unix environment. I have some file in my home directory. Some of the files are old and some new. I need Perl script using which I can get the following result. This is just an example: 19-Dec-2009 (Date) 20-DEC-2009 ( Date) ========= =============== ABC123 (n

    Perl find: locating single file or multiple files

    Please help with the following programming problem. I always use the following find command in Unix to locate one or several files: find / -name filename -type f 2>errormessage The Unix find command is very slow. It takes lot of time to get the required results. I was told Perl has one of the best find command. Plea

    Web Site and Publishing Paper

    Write a paper describing the steps involved in publishing a Web site. o Investigate two free and two fee-based options. o Explain which option you prefer and why. o Include any personal experience you may have publishing a Web site.

    Future trends and professions in Information Technology

    Locate information on technology trends or technology professions from an online search or a library search. Post your response to the following: Research future trends and professional opportunities in the Information Technology (IT) field. What opportunities are being created in the IT field as a result of the advancement o

    Write separate Perl scripts for given file processing requirements.

    Write separate Perl scripts for each of the given requirements. Mentioned input data files are attached with this posting. In each case command to run the script from the command line should look like: COMMAND_PROMPT> script_number.pl input_data_file.txt [1] A script script_1.pl that replaces each instance of "th" with "TH

    Converting CSV File Into Table Using Perl

    Create a Perl script to parse through a comma-separated values (CSV) file and display each record in a tabular format. As an example, take: John, Dean, 23 Malcolm, Ranger, 49 Jennifer, Randolf, 49 And then display it in a table such as: (see attachment)

    Perl Script Webpage

    2. Create a Perl script in order to display a basic Web page and display system information that is dynamic using Perl on the screen such as date and time as well as the host and how long the system has been up. 3. Submit the Perl script as well as a screenshot that displays what your code has produced in one zipped file.

    Perl program update

    Please apply the following formula below to the program so it works correctly! The following formula is used to calculate the fixed monthly payment (P) required to fully amortize a loan of L dollars over a term of n months at a monthly interest rate of c. [If the quoted rate is 6%, for example, c is .06/12 or .005]. P = L

    Perl Program - Mortgage Calculator

    Write a mortgage calculator PERL(.cgi) program that asks the user for the following information: 1. Loan amount 2. Number of years 3. Percent per year compound interest Use the following formula to determine the total amount of each payment: n = months * 12 r = percent per year compound interest L = loan amount P = Lr(1+

    Schema for XML documents

    There are a number of other Schema languages defined for use with XML documents apart from DTD and the W3C XML Schema. One of these is DSD. Investigate DSD as well as some other different Schema languages for use with XML, give a synopsis of each of the ones you find and compare some of the differences between these, DTD and XML

    PERL Programming Temperatures

    When a user enters 101 for a temperature the program states the patient has expired which is not the correct response. How do I correct the problem. Thanks.

    PERL Programming Validate Correctly

    I am having trouble in getting the sub bodytemp to validate correctly. For example if the user enters 102 for the temp the program will state the patient has expired which is not correct. (See attached file for full problem description)

    PERL Programming Main Functions

    Although there is no hard number of lines for any function includeing your main function, people always feel that 15-20 lines per function should be the right size. Try to avoid very long functions and very large main. This negatively affects the readability of your program. With this being said my vital.cgi program is to lon

    PERL Programming Script

    Write a program called tripper.cgi that will ask the user the number of miles he has driven and the amount of gas he used. In the tripper script, write a subroutine called mileage that will calculate and return the user's mileage (miles per gallon). The number of miles driven and the amount of gas used will be passed as argumen

    Write a Program in Perl to Validate Input Temperature

    1. Physicists tell us that the lowest possible temperature is absolute zero. Absolute zero is -459.69 degrees Fahrenheit. a. Accept inputs from the user: a beginning temperature, an ending temperature, and an increment value (all Fahrenheit). b. Check for bad input: a temperature less than absolute zero and an ending temp

    PERL Programming

    See the attached file. Add comment lines for the different sections. 1 $fruit1 = "pear"; 2 $fruit2 = "peaR"; 3 $result = $fruit1 gt $fruit2; 4 print "$resultn"; 5 $result = $fruit1 lt $fruit2; 6 print "resultn"; (Output) 4 1 6 0.