wantarray() in a subroutine returns true for list context, false
for scalar context.
# SCALAR context
if (/regexp/) { }
while (/regexp/g) { } |
# LIST context ($day, $month, $year) = /(\d+)-(\d+)-(\d+)/; @all_matching_bits = /regexp/g; |
| Forward to Records and objects
Back to The strictures Up to Stages of a Perl Programmer section index Up to YAPC 2000 course index |
YAPC 2000: Stages of a Perl Programmer - 28
Copyright © 2000, Nathan Torkington
|