Following are the Perl projects
Rot13 is an encryption method in which each of the 26 characters a-z or A-Z is replaced by the character 13 places ahead or 13 places back in the alphabet. Write a Perl program that reads a series of text and outputs the rot13 equivalent.
-
Input to rot13: This sentence is to be converted in Rot13 Format. Hangon.
-
Output of rot13: Guvf fragrapr vf gb or pbairegrq va Ebg13 Sbezng. Unatba.
For code please click here Solution
Problem statement:
a. The government has introduced a road rationing system by imposing the ‘odd-even’ rule. On even dates, only cars with license plates ending with an even number will be allowed on the city roads. On odd dates cars with license plates ending with odd number will be allowed. Write a PERL script that will help to create a file containing records of all cars in the city. The input data should be entered while running the script. The file should contain 20 entries in the following format
Name | Registration Number |
---|---|
Rahul | TN02BC9906 |
Ganesh | TN01AC1525 |
b. Write a PERL script that will accept the date as input and determine from the above file, the cars that would be permitted on the road on that day based on the odd-even rule. The output should display the name and registration number of the permitted vehicles.
Solution:
Step followed
a. Data Input
b. Creating file to store data
c. Sorting on the basis of Even and Odd
d. Creating new file to store evan and odd registration number speratly
Perl type used File handling, Regural expression, Control stucuture, Looping construct, Standard I\O
For code please click here Solution
Note: I'm beginner please suggest any improvement 😁