www.perl.com
Perl Programming
Context
  • Context determines how variables and values are evaluated
    • In Perl, is "1" a number, a string, or a boolean value?
    • In English, is "fly" a noun, a verb, or an adjective?
    • A variable or value can have different meanings in different contexts
    • Context is more important than "type"
  • Several types of scalar context
    • numeric
    • string
    • boolean
  • Scalar vs. list context
    • Scalar context require a single value
    • List context allows multiple values
Previous http://stuff.mit.edu/iap/perl/