It seems to amaze some of you folks that I actually know how to write Perl source code ... :-D ... even though in many of my posts I do not choose to do so. (There’s More Than One Way To Post It.)
It just seemed to me that “three actual examples would make this thread a little more clear,” so I cobbled-up three Perl one-liners and copied-and-pasted them directly from my terminal window with appropriate disclaimers. I was trying to clarify the three cases discussed in prior comments by giving a three-way example, not to coat-tail upon any of them.
The comments about $a,$b are of course valid ... these two names have special meaning e.g. in sort-comparison subroutines. As are the comments about better ways to write Perl code for inclusion in posts. But, these were presented as “bash-shell one-liners meant for illustration only” and I hope they helped.™