Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @things = ("hello", "why", 6, "we are the weirdos mister");
- print "$things[0] @things[0..3]\n";
- $things[2] = "no longer a number";
- print "@things[0..3]\n";
- #print "$things[6]\n";
- #push @things, qw(sup newfriend );
- #print "$things[6]/n";
- #$nope = pop @things;
- #print "$nope\n";
- returns
- hello hello why 6 we are the weirdos mister
- hello why no longer a number we are the weirdos mister
- @things = ("hello", "why", 6, "we are the weirdos mister");
- print "$things[0] @things[0..3]\n";
- $things[2] = "no longer a number";
- print "@things[0..3]\n";
- print "$things[6]\n";
- push @things, qw(sup newfriend );
- print "$things[6]/n";
- #$nope = pop @things;
- #print "$nope\n";
- returns
- hello hello why 6 we are the weirdos mister
- hello why no longer a number we are the weirdos mister
- Use of uninitialized value in concatenation (.) or string at test.pl line 27.
- Use of uninitialized value in concatenation (.) or string at test.pl line 29.
- from what I know, you can't have undefined slots between defined slots in arrays?
- push @things, qw(sup newfriend ); would put this in the 4th slot anyhow.
- @things = ("hello", "why", 6, "we are the weirdos mister");
- print "$things[0] @things[0..3]\n";
- $things[2] = "no longer a number";
- print "@things[0..3]\n";
- #print "$things[6]\n";
- push @things, qw(sup newfriend );
- #print "$things[6]/n";
- $nope = pop @things;
- print "$nope\n";
- hello hello why 6 we are the weirdos mister
- hello why no longer a number we are the weirdos mister
- newfriend
- so I have zero idea what you're expecting for the answer to Question 6.
- ..I mean especially since things[6] (dimensions[6]) would imply 7 scalars, not 6.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement