Arrays in Strings
- Arrays are separated by spaces when they're interpolated into strings:
@players = qw# Mario Luigi Toad Princess #; print "Players are @players\n";
- Empty arrays become empty strings:
print "Nothing to see (@things) here\n";
| CPU: Perl, Fall 2005 | Perl, Week 3: More Arrays, Context, Subroutines, Lexical Variables | #13 |
@players = qw# Mario Luigi Toad Princess #; print "Players are @players\n";
print "Nothing to see (@things) here\n";
| Copyright © 2005 Ian Langworth |