Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

my (fooref) = shift;
I see many examples in the camel book where a
subroutine takes one argument and the one argument is
an array ref.

my (foo_ref) = shift;

There is however at least one example where it is

my foo_ref = shift;

I am trying to figure out if this matters.  What would
shift care about list context?   shift should still
yield  one thing an array ref???    See page 356 in
the camel book, and page 224.  (I think).
matthewsacks1415@yahoo.com


 ________________________________________
__________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Report this thread to moderator Post Follow-up to this message
Old Post
Matthew Sacks
04-28-05 01:56 AM


Re: my (fooref) = shift;
Matthew Sacks wrote:
> I see many examples in the camel book where a
> subroutine takes one argument and the one argument is
> an array ref.
>
> my (foo_ref) = shift;
>
> There is however at least one example where it is
>
> my foo_ref = shift;
>
> I am trying to figure out if this matters.  What would
> shift care about list context?   shift should still
> yield  one thing an array ref???    See page 356 in
> the camel book, and page 224.  (I think).
> matthewsacks1415@yahoo.com

shift() returns a scalar in either list context or scalar context so both
statements do the same thing.


John
--
use Perl;
program
fulfillment

Report this thread to moderator Post Follow-up to this message
Old Post
John W. Krahn
04-28-05 01:56 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:36 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.