#!/usr/bin/perl -w use strict; # use localtime # reference perl script: localtime.pl my @times = localtime(); my $mon = $times[4] + 1; print "current month:$mon\n"; my $line="Betty Boop:245-836-8357:635 Cutesy Lane, Hollywood, CA 91464:4/23/23:14500"; my @items=split(/:/, $line); my $name = $items[0]; my $phone = $items[1]; my $addr = $items[2]; my $dob = $items[3]; my $salary = $items[4]; if ($addr =~ "CA") { print "$name is in CA\n";} my @mdy = split(/\//, $dob); print " $name is born in month of $mdy[0]\n"; if ($mdy[0] == $mon) { print "$name was born in the current month\n"; }