Perl Monk, Perl Meditation | |
PerlMonks |
Re: How do you tell if a sub argument is an lvalue?by liverpole (Monsignor) |
on Feb 10, 2007 at 20:57 UTC ( [id://599395]=note: print w/replies, xml ) | Need Help?? |
Hi rsmah++,
That is a very interesting question! I don't know if this is the best answer, but my first thought was to try assigning to the variable and see what happens:
The output of this is:
Since the write operation is wrapped in an eval, it returns undef if the assignment failed (constant), otherwise the result of the assignment. s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
In Section
Seekers of Perl Wisdom
|
|