Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Re: Re: Dereference an array reference

by danger (Priest)
on Apr 19, 2001 at 11:42 UTC ( #73771=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Dereference an array reference
in thread Dereference an array reference

That's all well and good to say -- but it might help to give a little context (Oh my, what pun!) to ponder:

#!/usr/bin/perl -w use strict; my $scalar; my @list; sub foo { return (42, 24, 10); } sub bar { my @array = (42, 24, 10); return @array; } $scalar = foo(); # same as: $scalar = (42,24,10); @list = foo(); # same as: @list = (42,24,10); print "$scalar:@list\n"; # prints: 10:42 24 10 $scalar = bar(); # same as: $scalar = @array; @list = bar(); # same as: @list = @array; print "$scalar:@list\n"; # prints: 3:42 24 10 __END__

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://73771]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2020-12-03 01:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (49 votes). Check out past polls.

    Notices?