#!/usr/bin/perl use strict; use warnings; my $str = "Internal Computing Department"; print join '', map {uc substr $_, 0, 1} split ' ', $str;