in reply to Re: escapeHTML & scalar/array context
in thread escapeHTML & scalar/array context

map {print $q->escapeHTML($_)} Data::Dumper::Dumper($foo,$bar);

map in void context is evil. Use map to generate a list, not to just loop over something. Use the for modifier for that.

print $q->escapeHTML($_) for Data::Dumper::Dumper($foo, $bar);
Or use map the way it is supposed to be used:
print map $q->escapeHTML($_), Data::Dumper::Dumper($foo, $bar); print map { $q->escapeHTML($_) } Data::Dumper::Dumper($foo, $bar);
(The blockless version is shorter and faster.)

- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.