## print "foo" until $count becomes 5 my $count = 0; do{ print "foo\n"; $count++; } until ( $count == 5 ); ## call some command until its exit status ## is 0 ( success ) do { system( "cmd" ); } until( $? == 0 );