in reply to Non-prefix form of sub

Yes, you can create a subroutine that accepts a scalar distinct from an array or even a list. No, you cannot create subroutines that in general act as infix operators. If you control the operands to a particular object type, you can use overloading to call the subroutine when an existing infix operator of your choice is called on your object type, but that'd probably be as close as you get.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
RE: Re: Non-prefix form of sub
by Maqs (Deacon) on Oct 08, 2000 at 19:33 UTC
    Thanx, merlyn! You are consistent as always :)
    /Maqs.