Game Instructions

Tap a tile to toggle its color. When a tile changes nearby tiles may change as well. Each move affect multiple tiles. The target is to turn all tiles into yellow in the fewest steps possible.

Press 'j' to show/hide the game. Press 'i' to show/hide the instructions. Press 't' to show/hide the top score table.

Steps: 0

Top Scores

Name Steps

Congratulations!

You solved the puzzle in 0 steps!

Success!

Score submitted successfully!

Error

Failed to submit score. Please try again.

The use warnings; Statement in Perl

Adding this statement to the begining of our code will trigger warnings for our code wherever relevant. Adding ‘use warnings Fatal => ‘all’; to our code will promote all warnings to errors and die immediately on the first warning.

#!/usr/bin/perl

use strict;
use warnings;

my %currencies = (

    USD     =>  4.1,
    EURO    =>  4.4,
    GBP     =>  6.7

);

my $currency = 'GBP';

if (not exists $currencies{$currency}) {
    print("$currency doesnot exist");
} else {
    print("$currency exists");
}

Share:

The Beauty of Code

Coding is Art! Developing Code That Works is Simple. Develop Code with Style is a Challenge!

Update cookies preferences