|The stupid question is the question not asked|
@F vs. $F - The Wrong Answerby Elgon (Curate)
|on Feb 21, 2003 at 00:01 UTC||Need Help??|
What is happening here is related to the way that Perl looks at individual values (scalars) and lists of values (arrays.) When you are referring to the whole list, stored in @F, say in a foreach loop...
...then you should use the @ prefix but when you want a single, discrete value within @F, such as $F, say in the following if clause...
...then you should use $F. Essentially, if you're trying to access a single value then you'll want $, a list of values @ and a hash of key/value pairs %. Type "perldata" into the search box at the top of any perlmonks page and hit the search button. This should explain all you wish to know.
Update : Apologies to all concerned, I completely misread the question in my eagerness to provide an answer. Please ignore the above. *Goes very red*
"What this book tells me is that goose-stepping morons, such as yourself, should read books instead of burning them."