#!/usr/bin/perl -w use strict; use warnings; my $text="this is a sample"; my @word=split(//, "$text"); for (0 .. $#word){ print "$word[$_]"; sleep 2; } print "\n";