#!/usr/bin/perl use warnings; use strict; my @array = ("onE", "two", "THREE", "fOUR", "FiVe"); foreach (@array) { $_ = ucfirst lc; # lc uses $_ by default with no argument } print join(',', @array);