Just some fun code, because I keep on being amazed about how effective, straight forward and especially beautiful Perl can be!


#!/usr/bin/perl -w

use warnings;
use strict;

QUESTION:{

    print 'Type any text, enter "q" to quit: ';
    chomp (my $input = <STDIN>);

    last if ($input eq "q");

    my @arry = split //, $input;
    print "Reversed: ". join("",reverse @arry)."\n";
    redo;
}

print "Bye!\n";