Hi Ashmita, on every ubuntu machine, perl comes pre-installed. But in case you have uninstalled it somehow or couldn't find it or even wants to upgrade it, you can simply follow these steps to install it:
1. To install the perl, use following commands one by one:
>>sudo apt-get update
>>sudo apt-get install perl
2. To upgrade the perl version, use following command:
>>sudo apt-get upgrade perl
3. Finally to check whether perl is installed properly or not, write this command in terminal:
>>perl -v
If you see a message same as shown in above image, you have successfully installed Perl on your ubuntu machine.