perlquestion
strat
Dear monks,<P>
every time I use a perl-onliner with -ane and @F, I wonder why I can't access a single column of the input file with <code>$F[6]</code> (which contains undef) but have to use <code>@F[6]</code> and will get warned if I enable warnings about like the following way:<P>
<code>
Scalar value @F[6] better written as $F[6] at -e line 1.
</code>
<P>An example code may be:<P>
<code>
perl -0012 -ane "print join(' => ',@F[8,6]),qq~\n~ if @F[6]=~/cmd\.exe/" access.csv;
</code>
For input file, I used an apache access-log where the spaces were replaced by a tab as separator.<P>
Do you know the reason for this strange behaviour?
<P>
Best regards,<BR>
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.32.32"