in reply to array index
Hello, suppose @question holds "foo boo doo" so $question[0] = foo and so on.
Just some nitpicking: others already answered your question. Precision is important when dealing with technical issues and especially when asking technical answers. For this, in some cases it's better to express oneself in Perl rather than in English. In particular in Perl "foo boo doo" is a single string, so it may be slightly confusing. You can specify the contents of an array by... specifying the list of its contents, e.g. like thus:
@question=('foo', 'boo', 'doo');
If that seems like too much typing to you, then you can take advantage of the qw operator:
@question=qw(foo boo doo);
|
|---|