http://qs321.pair.com?node_id=800458


in reply to Formatting dynamic method names

Perhaps it should be

Method 2: --------- for ( keys %hash ) { $object->${ \"set_$_" }( $hash{$_} ); }

Update: concerning the question, I would prefer first method. It explains itself, so it is clear what it is doing even for newbie. Second statement, though shorter, will require more time to read and understand for some persons.