I don't know perl, but it seems to me that you've set a variable i to have the value of 2 and then set up your loop to terminate when i is equal to 1, but you never change the value of the variable. Something like
Code:
#!/usr/local/bin/perl -w
use strict;
use warnings;
my $i=2;
until ($i==1)
{
my $a = `date +\%H:\%M:\%S`;
`zenity --info --text $a`;
$i--;
}
would decrement $i and cause the loop to exit after one iteration. Maybe if you explained more clearly what you were trying to do (why loop, how many times intended, etc.) more people could help. Also, your phrase "my task" makes it sound like homework, which may be discouraging folks from replying. And code blocks should be in 'code' tags rather than 'quote'. Hope some of this helps.