Confirmation Bias

View as PDF

Submit solution

Points: 10
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
Perl, Ruby

I am sure you have all seen

As it turns out, you can write programs that do the same!

Your challenge is to write a program that runs as both Perl and Ruby, and as Perl, it will print the string This is a Perl program., while as Ruby, it will print This is a Ruby program.

Input Specification

There is no input.

Output Specification

When run as Perl:

This is a Perl program.

When run as Ruby:

This is a Ruby program.

Comments

There are no comments at the moment.