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; }
In reply to Re: Creating hourglass using PERL
by Joost
in thread Creating hourglass using PERL
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |