in reply to Re^2: Transforming a for loop to a more functional approach?
in thread Transforming a for loop to a more functional approach?

Habit mostly. I like Streamer's default output better and I don't have to remember to print the result:

use Data::Dumper; use Data::Dump::Streamer; my @ListOfRecords = qw(1 a 2 b 3 c 4 d); my %MappingOfRecords = reverse @ListOfRecords; print Dumper \%MappingOfRecords; Dump \%MappingOfRecords;

Prints:

$VAR1 = { 'c' => '3', 'a' => '1', 'b' => '2', 'd' => '4' }; $HASH1 = { a => 1, b => 2, c => 3, d => 4 };

True laziness is hard work