#!/usr/bin/perl use strict; use warnings; use feature qw{ say }; my @student = qw( John Jane Jack Jules Jim ); my @age = ( 20, 19, 21, 22, 18 ); my $whose_birthday = 'Jane'; for (my $i = 0; $i <= $#student; $i++) { # ~~ if ($student[$i] eq $whose_birthday) { $age[$i]++; say "Happy birthday $student[$i], you're now $age[$i]!" } }