in reply to Creating hourglass using PERL

You will probably need to explain what you mean by "hourglass".

Something like this?

#!/usr/bin/perl -w use strict; $|=1; { my @chars = qw(/ - \ | / - \ |); my $count; sub hourglass { print "\r$chars[$count++]"; $count = 0 if $count == @chars; } } for (1 .. 100) { hourglass(); sleep 1; }