On Wed, Sep 28, 2011 at 7:27 PM, Linda W <perl-diddler@tlinx.org> wrote: > but expecting sprintf @arr to work would mean that open @arr should also >> work, and so on; That road leads to madness. >> > open @arr would work? Why? It's NOT a simple list of scalers... > First, that's not true. C<open> only takes scalars for operands. Secondly, you just answered your own question. What's special is the syntax. c<printf> has a special syntax just like c<open>, which is why C<printf> bhves different than C<sprintf>, C<substr>, C<length>, etc. > It's first arg is something to be *written to*. Actually, it's not. The first operand is a file handle. C<open> and C<printf> write to the handle, but not to the first arg. Even if it was being written to, you think you can write to one scalar, but not $args[0] which is also a scalar? There is no special type in perl (that I'm aware of), > call 'FORMAT STRING'.... > That's eaxctly what sprintf is not special and printf is.Thread Previous | Thread Next