#!/usr/bin/perl use 5.008001; use strict; use warnings; use utf8; our @SMALL_WORD = qw/ (? 1 ) ? \@str : $str[0]; } use open qw( :encoding(UTF-8) :std ); use Getopt::Std 'getopts'; getopts 'f', \my %opt; while ( readline ) { $_ = lc if $opt{'f'}; print titlecase( $_ ), "\n"; }