Skip to content

Yaduvanshi05Bhupendra/Data-Science

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Perl Practice and Projects

Index

Perl-mini-Projects

Following are the Perl projects


perl

  1. Rot13-Cipher

  2. Overview

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.

  1. Output


For code please click here Solution

  1. Even-Odd-vehical-on-Even-Odd-day

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 😁

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published