- Home >
- Programming >
- need help in PERL programing language
need help in PERL programing language
Question Description
Hello, I'm looking for help to do this lab, because I'm not that good at PERL programming language. I tried my best but nothing work. The submission is two hrs from now. can you help me do it please ?
LAB 5 - DESCRIPTION
- perl example from the class.txt ==>this is help to use it as a template please
Create a Perl program that is simply a loop over a set of "Regular Expressions" that perform the tasks described below. Use the attached file SampleConfig.txt as input.
Note: Though this is a bit assignment is a bit contrived, it does represent the types of actual text manipulations that might be performed over many large files.
Instructions:
Using the attached SampleConfig.txt file, provide a Perl regular expression for each of the following tasks:
- Remove any leading or trailing space from each line.
- Replace all of the occurrences of a full line of # characters (ignoring leading or training spaces) with the following: # ---------- #
- Change any URL ending in .htm to end with .html
- For any set of multiple words following an equal sign (=), place what follows the equal sign in quotes.
- eg: a = bcd efg becomes a = "bcd efg"
- eg: a = bcd remains a = bcd
- Add a semicolon (;) to the end of every line.
- Every line beginning with a comment marker (#) and containing additional text should have one (and only one) space folling the comment marker.
- Replace any pattern in the form of [__UPPER-CASE CHARACTERS__] with (lower-case characters)
- ie: Open square bracket + two underscores + upper-case text + two underscores + close square bracket
- eg:[__SOMEDATA__] becomes [somedata]
- Follow every "config section" with a comment that indicates the current section count:
- For example:
[SVN] # Section: 1
[......] # Section: 2
etc.
- For example:
Submit:
A file containing the Perl code to fulfill the above requirements
A version of the SampleConfig.txt file incorporating all of the above changes
Unformatted Attachment Preview
This question has not been answered.
Create a free account to get help with this and any other question!
Similar Content
Nervous Conditions
by Tsitsi Dangarembga
Little Women
by Louisa May Alcott
The Book Thief
by Markus Zusak
Normal People
by Sally Rooney
A Passage to India
by E. M. Forster
The Power of Habit - Why We Do What We Do in Life and Business
by Charles Duhigg
Daisy Miller
by Henry James
One Flew Over the Cuckoos Nest
by Ken Kesey
The BFG
by Roald Dahl
Studypool values your privacy. Only questions posted as Public are visible on our website.
Brown University
1271 Tutors
California Institute of Technology
2131 Tutors
Carnegie Mellon University
982 Tutors
Columbia University
1256 Tutors
Dartmouth University
2113 Tutors
Emory University
2279 Tutors
Harvard University
599 Tutors
Massachusetts Institute of Technology
2319 Tutors
New York University
1645 Tutors
Notre Dam University
1911 Tutors
Oklahoma University
2122 Tutors
Pennsylvania State University
932 Tutors
Princeton University
1211 Tutors
Stanford University
983 Tutors
University of California
1282 Tutors
Oxford University
123 Tutors
Yale University
2325 Tutors