On Aug 5, Jose Alves de Castro said: >sub trim($), for instance, means that trim will work on a scalar.
It means that trim() expects ONE argument and will enforce scalar context on it. trim($foo) and trim(@bar) both work. >This is useful to, instead of something such as > >trim($var) > >use something such as > >trim $var That has nothing to do with prototypes. That is only the case when trim() is defined before it's used (or before that specific use of the function). >Also, > >trim > >by itself is interpreted as trim($_) Not so; trim($) means it *must* have an argument sent to it. -- Jeff "japhy" Pinyan % How can we ever be the sold short or RPI Acacia Brother #734 % the cheated, we who for every service http://japhy.perlmonk.org/ % have long ago been overpaid? http://www.perlmonks.org/ % -- Meister Eckhart -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>