Missing first arg in list causes error

Paul Makepeace london.pm.org at paulm.com
Sat Feb 11 12:50:49 GMT 2006


This just bit me,

  $ perl -le 'print [,"",,]'
  syntax error at -e line 1, near "[,"
  Execution of -e aborted due to compilation errors.
  $ perl -le 'print ["",,,]'
  ARRAY(0x814ac28)
  $

Why does the first one fail?

Paul

-- 
Paul Makepeace .............................. http://paulm.com/inchoate/


More information about the london.pm mailing list