What's the difference between 'eq' and '=~' in Perl?

Viewed 16810

What is the difference between these two operators? Specifically, what difference in $a will lead to different behavior between the two?

$a =~ /^pattern$/

$a eq 'pattern'
5 Answers
Related