Hello all,

I am clearly overlooking something basic, but I can't wrap my
head around the parse error in the second command below.
It is apparently caused when the the only contents of a map()
BLOCK is a list without parens.

  || % perl -le 'print map {1; 1, 2} qw(a b)'
  || 1212
  || % 
  || % perl -le 'print map {1, 2} qw(a b)'
  || syntax error at -e line 1, near "} qw(a b)"
  || Execution of -e aborted due to compilation errors.
  || % 
  || % perl -le 'print map {(1, 2)} qw(a b)'
  || 1212
  || % 
  || % perl -v | grep built
  || This is perl, v5.6.0 built for sun4-solaris
  || %

Deparse doesn't help me grok the parse error.

  || % 
  || % perl -MO=Deparse -le 'print map {1, 2} qw(a b)'
  || syntax error at -e line 1, near "} qw(a b)"
  || -e had compilation errors.
  || ;
  || %

Any advice on correcting this one-liner would be most
helpful.  TIA.

peace,          || Byatrayanapura: Better governance thru online taxes:
--{kr.pA}       || http://tinyurl.com/296js
-- 
"If I have not seen farther, it is because giants have stood on my shoulders."
    -- V. Guhan.  [with apologies to Newton, Sir Isaac.]
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to