in reply to Bless and Do
If you are not using $_ in the local block, this should meet the need to avoid temporary variables, while maintaining readability, and avoiding "do":
As mentioned before, the assignment is necessary to avoid "Modification of a read-only value attempted at ..".my $variable=bless \(local $_=49) ,'Rates::Notification';
If you are using $_, then the previous recommendations apply, in order to reduce the scope of the local assignment.
What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
-Larry Wall, 1992
|
---|
In Section
Seekers of Perl Wisdom