#!/usr/bin/perl use strict; use warnings; use Text::CharWidth qw(mbswidth); my $string = 'Number of columns?'; print mbswidth($string), "\n";