in reply to Re: map syntax error -- weird
in thread map syntax error -- weird
Why does this work? (same result as your proposals)
my %opt; my @vals = qw(title artist album); my @opts = map { "$_"."=s" => \$opt{$_} } @vals; print @opts;
UPDATE: Guess: Because there is some statement in there that needs to be executed rather than a static string only?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: map syntax error -- weird
by LanX (Saint) on Mar 22, 2013 at 10:54 UTC | |
Re^3: map syntax error -- weird
by BrowserUk (Patriarch) on Mar 22, 2013 at 10:54 UTC |
In Section
Seekers of Perl Wisdom