#!/usr/local/bin/perl use strict; use warnings; my $input = 'abcdef'; my $start = 'a'; while (1){ last if $start eq $input; $start++; } print "$input -> $start\n";