There's more than one way to do things | |
PerlMonks |
Re: repeated characters in regular expressionsby Utilitarian (Vicar) |
on Aug 01, 2013 at 07:54 UTC ( [id://1047383]=note: print w/replies, xml ) | Need Help?? |
Something like the following
$string=~s/(.){$n}/$1 x $m /eg;
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
In Section
Seekers of Perl Wisdom
|
|