Consider this:
Furthermore, the distinction between a list and an array goes to context. There are two context's in perl, list, and scalar. The scalar function forces scalar context. The for (@something) "construct" implies list construct, as do functions and other things. To get a better grip on context in perl, please read japhys excellent article from perlmonth.com Issue 9: "List" is a Four-Letter Word (local) (remote).for my $thing("this","Is","aA","List") { print "$thing\n"; } print "\---------\n"; my @things = ("this","Is","aA","List","being","assigned","to","an","ar +ray"); for my $thing(@things) { print "$thing\n"; } print "\---------\n"; my %things = ("this", "Is", "aA", "List", "being", "assigned", "to", "a", "hash", "and", "as", "such", "it", "must", "be", "EVEN!", ,); for my $thing(@things) { print "$thing\n"; }
___crazyinsomniac_______________________________________
Disclaimer: Don't blame. It came from inside the void
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"
In reply to (crazyinsomniac) Re: What is the difference between a list and an array?
by crazyinsomniac
in thread What is the difference between a list and an array?
by sierrathedog04
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |