in reply to Rotate Background At Startup

# How many pictures you have in your rotate folder my $num_of_pics = 10;

Or you could get the actual number of pictures:

# How many pictures you have in your rotate folder my $num_of_pics = () = <~/Pictures/rotate/*.jpg>;

Or just use ordinarily named files and pic one at random:

my @all_pics = <~/Pictures/rotate/*.jpg>; print `feh --bg-center $all_pics[ rand @all_pics ]`;
# Get a random number from your total of pictures my $pic = int(rand($num_of_pics)+1); chomp($pic);

There is no need to chomp a number because there is no newline at the end of it.