@bar = qw( one small step for man ); $foo = \@bar; $foo->[1] = "big"; print "@bar"; # one big step for man #### @bar = qw( one small step for man ); $foo = \@bar; $foo = [qw( one big step for man )]; print "@bar"; # one small step for man #### sub tie_session { my ($hash) = @_; eval { tie %$hash, 'Apache::Session::File', undef, { Directory => $r->dir_config('Blah'), LockDirectory => $r->dir_config('Blah'), }; }; return $@ if $@; return $hash; # not actually necessary, but it returns true } #### sub function { my ($hash) = @_; MyModule::tie_session($hash); $hash->{auth}->{user} = "jacques"; }