Thank you so much ! , you are spot on , the theory you mentioned in the first part of your reply is exactly what's happening with my code , I am actually using an online perl compiler and feeding the input from that(not from any file) , and as you correctly mentioned that every line contains CRLF at the end and chomp is only taking care of LF , and that's why the hash %count is treating the 2 "Perl" input in array as separate instead of treating them as unique , you provided so many valuable things in your reply and it will really help me on my journey to become a good perl programmer , once again thank you :-)
In reply to Re^2: Doubt in code - Beginner in perl
by Perl_Programmer1992
in thread Doubt in code - Beginner in perl
by Perl_Programmer1992
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |