Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Array value changing for some reason

by choroba (Cardinal)
on Dec 31, 2018 at 22:42 UTC ( #1227849=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub { ++$_ for @_ }->(my @arr = 'a' .. 'c'); print "@arr";
    # Output: b c d
    
  2. or download this
    sub reverseArray {
        my @arr = @_;
    ...
            @{ $arr[$i] } = reverse @{ $arr[$i] };
        }
    }
    
  3. or download this
    sub reverseArray {
        my @arr = @_;
    ...
            $arr[$i] = [ reverse @{ $arr[$i] } ];
        }
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2023-01-30 18:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?