Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
String to vowelcase (#4806)
Browse files Browse the repository at this point in the history
Co-authored-by: Harsh Raj <harshraj8843@gmail.com>
  • Loading branch information
anandfresh and harshraj8843 committed Dec 1, 2023
1 parent 2934c15 commit 4edeb1d
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
print "Enter a string: ";
chomp(my $str = <STDIN>);
my $result = '';
$str = lc($str);
foreach my $char (split //, $str)
{
if ($char =~ /[aeiou]/)
{
$result .= uc($char);
}
else
{
$result .= lc($char);
}}
print $result;

1 comment on commit 4edeb1d

@vercel
Copy link

@vercel vercel bot commented on 4edeb1d Dec 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.