Conserving memory - was SPUG: Fw: greetings

Jason Lamport jason at strangelight.com
Sat Oct 20 17:07:09 CDT 2001


At 2:30 PM -0700 10/20/01, Tim Maher/CONSULTIX wrote:
>On Sat, Oct 20, 2001 at 02:18:05PM -0700, Ken Clarke wrote:
>>  Hi Folks,
>>
>>      I love picking up efficiency tips like the one at the bottom.  Which
>>  context does print use?
>
>print, like all functions (and subroutines), provides the LIST
>context to its arguments.

I thought some functions provided scalar context (for example those 
declared with a prototype of ($)):

sub wants_scalar($) {
	...
}

Or am I misunderstanding what the function prototype mechanism does in Perl?

-jason

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/





More information about the spug-list mailing list