m/.../ returns true or false in scalar context m/.../g give you a list of matches in list context m/(...)/ can populate an array with whatever gets captured... (??) while( ) i.e. inside parenthesis is evaluated in scalar context? foreach( ) i.e. inside parenthesis is evaluated in list context? returns the next line of input in list context