I'm from a Ruby background. Just wanted to know if there is something like Ruby irb in perl?
Yes, there is a perl debugger. Canonical team
perl -de 1
to open an interactive session where you can execute arbitrary Perl statements.
See perldoc perldebug for documentation.
perldoc perldebug
Check the Perl :: Shell or psh shell module .
Also see Devel :: REPL and iPerl .
Not quite what you wanted, but psh is nice.