Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Non-destructive array processing

by adrianh (Chancellor)
on Jan 20, 2003 at 22:51 UTC ( #228515=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $r1 = sub { \@_ }->(@array);
    my $r2 = \@array;
    
  2. or download this
    my @array = (1..10);
    my $r1 = sub { \@_ }->(@array);
    ...
    my $r2 = \@array;
    pop @$r2;
    print "changed @array\n";
    
  3. or download this
    unchanged 1 2 3 4 5 6 7 8 9 10
    changed 1 2 3 4 5 6 7 8 9
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2014-11-27 13:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (184 votes), past polls