perl-weekly-challenges

Trying to solve Perl Weekly challenges mentioned in https://perlweeklychallenge.org/challenges/ website. Collection of solutions to perl-weekly challenges.

  • Write a script to replace the character ‘e’ with ‘E’ in the string ‘Perl Weekly Challenge’. Also print the number of times the character ‘e’ is found in the string.
  • Write a one-liner to solve the FizzBuzz problem and print the numbers 1 through 20. However, any number divisible by 3 should be replaced by the word ‘fizz’ and any divisible by 5 by the word ‘buzz’. Those numbers that are both divisible by 3 and 5 become ‘fizzbuzz’.
  • Write a script or one-liner to remove leading zeros from positive numbers.