[prev] [index] [next]

Syntax Conventions (cont)

A significant difference between Perl and PHP:
  • @ and % for arrays/hashes, $ for scalars
Generally, Perl shares many syntax conventions with PHP *:
  • $ to introduce (scalar) variables
  • single/double-quote distinction on string constants
  • multi-line strings and here-documents
  • interpolation of variable values into strings

* Perl thought of them; PHP (and others) borrowed them