http://qs1969.pair.com?node_id=296742

arno has asked for the wisdom of the Perl Monks concerning the following question:

hi,

I've got -3 of reputation for my contribution here.   As the update mentions my use of map in void context, i started searching about map function : i first used SuperSearch and found this.   I read "use of map in void context is deprecated" ..

Then I go on searching through usenet, and in a french newsgroup archives ( fr.comp.lang.perl ) i could read this piece of code showing the use of map in void context is still valid :

on the one hand :
$ perl -wle 'map { print } qw(d c a b)'
d
c
a
b
$ perl -wle 'sort { print "$a<=>$b"; $a cmp $b } qw(e d c a b)'
Useless use of sort in void context at -e line 1.

In perldoc -f map there's no use in a void context and they don't mention it at all.   I hope you can tell me more about it

Thanks in advance,
Arnaud

janitored by ybiC: Convert <a href="http://www.perlmonks.org/index.pl...">dis and dat</a> links to [id://foo|and dem] PM style to not log out monks with cookie set to other domains.