Conserving memory - was SPUG: Fw: greetings

Tim Maher/CONSULTIX tim at consultix-inc.com
Sat Oct 20 19:26:39 CDT 2001


On Sat, Oct 20, 2001 at 03:07:09PM -0700, Jason Lamport wrote:
> 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?

I was talking about the *rule*, rather than the *exceptions*, which
include the scalar() funtion, and any of your own user-defined subs
that are prototyped to accept specific argument types.  So I'd
say you understand what can be accomplished with prototyping. 8-}

-Tim
> 
> -jason
*=========================================================================*
| Dr. Tim Maher, CEO, Consultix        (206) 781-UNIX/8649;  ask for FAX# |
| EMAIL: tim at consultix-inc.com         WEB: http://www.consultix-inc.com  |
| TIM MAHER: UNIX/Perl  DAMIAN CONWAY: OO Perl  COLIN MEYER: Perl CGI/DBI |
|CLASSES:Int Perl 10/22; UNIX 11/26; Minimal Perl 11/30; Perl+Modules 12/3|
| /etc/cotd:  find /earth -follow -name bin-laden -print | xargs rm -rf   |
*=========================================================================*

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     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