ok in perldoc print it states: If FILEHANDLE is a variable and the next token is a term, it may me intrepreted as an operator unless you interpose a "+" .
so in the code :
while (<FOO>) {
....code
...code
print +(split)[2], $, ;
}
FOO is my filehandle and it is considered a variable meaning $_ right?
so the next token a term, would be what? print split or [2] ???
a term meaning a unary term?
and what exactly does interpose mean?
thanks for the perldoc!
"John W. Krahn"
<[EMAIL PROTECTED]
> To
Perl Beginners <[email protected]>
03/11/2005 05:37 cc
PM
Subject
Re: print with +split
[ Please TRIM your posts! ]
[EMAIL PROTECTED] wrote:
>
> Does anyone know the answer to:
>
> I took away the + from the print and I had some errors, why is the +
> infront of the split needed in Perl?
> I looked in my programming perl and could not find it.
perldoc -f print
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
