Well you seem to be having a wrong "aroma" experience on this one!
FWIW, this is not a homework. It is a major project and I am new to Perl/RE. So when I get stuck in coding, I occasionally post here asking for help because I always get excellent and superb help each time I seek answers. Moreover, almost everyone on this site seem to be super helpful.