> From: Steve Lane [mailto:sml@zfx.com] > Sent: Wednesday, November 10, 1999 08:20 > To: Larry Rosler > Cc: tallwine@carol.ixlabs.com; fwp@technofile.org > Subject: Re: [FWP] aCertainName.pm > > > Larry Rosler wrote: > > If you want to be reasonable, you might want to get the spec right. If > > there is no argument, abs(), like so many other builtin functions, uses > > $_ as its operand. > > > > So at least start out with: > > > > my $x = @_ ? $_[0] : $_; > > wouldn't the functions that take either a scalar > or list argument be easier to write using: > > @_ = ($_) unless @_; > > instead? Easier, perhaps. Correct, no! We're trying to reproduce the semantics of abs(), which say nothing about clobbering @_ if there is not argument. -- Larry Rosler Hewlett-Packard Laboratories http://www.hpl.hp.com/personal/Larry_Rosler/ lr@hpl.hp.com ==== Want to unsubscribe from Fun With Perl? Well, if you insist... ==== Send email to <fwp-request@technofile.org> with message _body_ ==== unsubscribe