use strict; use warnings; my $command; foreach(1..5) { $command = "date -d \"+ $_ day\""; system ("$command"); }