info > Array::RefElem

📖 NAME

Array::RefElem — Set up array elements as aliases

🚀 Quick Reference

Use CaseCommandDescription
🔗 Store element as alias in arrayav_store(@a, $index, $value)Makes $array[$index] and $value the same variable
📤 Push element as alias onto arrayav_push(@a, $value)Pushes $value; $array[-1] and $value become aliases
🔑 Store hash entry as aliashv_store(%h, $key, $value)Makes $hash{$key} and $value the same variable

📋 SYNOPSIS

use Array::RefElem qw(av_store av_push hv_store);

av_store(@a, 1, $a);
av_push(@a, $a);
hv_store(%h, $key, $a);

📝 DESCRIPTION

This module gives direct access to some of the internal Perl routines that let you store things in arrays and hashes. The following functions are available:

🔧 av_store(@array, $index, $value)

Stores $value in @array at the specified $index. After executing this call, $array[$index] and $value denote the same thing.

🔧 av_push(@array, $value)

Pushes $value onto the @array. After executing this call, $array[-1] and $value denote the same thing.

🔧 hv_store(%hash, $key, $value)

Stores $value in the %hash with the given $key. After executing this call, $hash{$key} and $value denote the same thing.

📚 SEE ALSO

perlguts

ÂŠī¸ COPYRIGHT

Copyright 2000 Gisle Aas.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Array::RefElem
📖 NAME 🚀 Quick Reference 📋 SYNOPSIS 📝 DESCRIPTION
🔧 av_store(@array, $index, $value) 🔧 av_push(@array, $value) 🔧 hv_store(%hash, $key, $value)
📚 SEE ALSO ÂŠī¸ COPYRIGHT

Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-16 10:07 @2600:1f28:365:80b0:7cb9:fb:26c1:e368
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!