Install Raku (Perl 6) in Ubuntu along with Perl 5.26

There is a community maintained Repository of the most recent build of Rakudo available here :

This is generally updated a few days after each official release and is currently on 2019.07.1

$ sudo apt-get install rakudo 
[ ... stuff happens ... ]
$ perl6 -v
This is Rakudo version 2018.03 built on MoarVM version 2018.03
implementing Perl 6.c.
$ perl -v

This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi
(with 67 registered patches, see perl -V for more detail)

The Raku compiler is in a package called rakudo. That package includes a program called perl6 which is the actual Raku compiler. The Perl compiler and the Raku compiler are two completely separate programs, so there is no problem having them both installed and running code using either of them. They are as separate as Perl and PHP.

Update: In a (now, bizarrely, deleted) comment, you asked

What was the way to open a vi editor and write a code in that

You do it in exactly the same way as you would do it for any programming language where the code is compiled or interpreted on each execution - Perl, Python, Ruby, bash, they all work the same way.

You can write a text file containing Raku code and run it with perl6 your_file_name.

Or you can put the correct shebang line (which is #!/usr/bin/perl6) at the top of the file and make the file executable with chmod +x your_file_name.