[EMAIL PROTECTED] wrote:

"John W. Krahn"


[ 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

> 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!

See also the "Symbolic Unary Operators" and "Named Unary Operators" sections
of perlop.pod.

perldoc perlop


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>




Reply via email to