Unfortunately, you have edited your code TOO much. We really need to see more to understand exactly what you are trying to do. The questions arise because you don't seem to have real values in your @SList array. Those appear to be headers that could be used in a Two Dimensional array or they appear to be keys that could be used in an Array of Hashes. You really need to provide more code and more context.
Additionally, there seems to be some confusion on your end about what qw() is used for -- you question whether or not you should be using scalars instead, without realizing that you already are using scalars. qw() is merely a convenience function that allows us lazy programmers to leave out quotations and commas when creating hard coded arrays, like so:
my @hard2type = ( 'one', 'two', 'three', 'four' ); my @ez2type = qw( one two three four );
Finally, perhaps you can elaborate what you mean when you said "... write a foreach loop that will go over each line in the list ..." because as it stands, you have only presented one line, not many. Thanks!
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: (Beginner) Can 'qw' be implemented into a list?
by jeffa
in thread (Beginner) Can 'qw' be implemented into a list?
by Halbird
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |