KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
This fails: my @a = ("a", "b", "c", "d", "e"); my %h = map { "prefix-$_" => 1 } @a; with this error: Not enough arguments for map at foo.pl line 4, near "} @a" but this works: my @a = ("a", "b", "c", "d", "e"); my %h = map { "prefix-" . $_ => 1 } @a; why?
Tags (comma-separated)
Save Edits
Cancel