in reply to assignment operator return values
Not to be too onerous, but you've given enough info to test it yourself. Why not just do this?
And there you have it.C:\>perl -demo Loading DB routines from perl5db.pl version 1.28 Editor support available. Enter h or `h h' for help, or `perldoc perldebug' for more help. main::(-e:1): mo DB<1> for (-1..1) { print "$_"; print "\tTrue" if ($x = $_); print " +\n" } -1 True 0 1 True DB<2>
But what happens when get_parent returns a false value? Here it seems OK, as $self is lexical to this sub. In other situations, you might not want to overwrite $self.
Yes, the assignment is done, and you can then test for it.
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
|---|