|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
hello..
i have created a simple object consisting of a array, hash, and a scalar variable. how do i insert a single element into the array. i have used classes in C++ so i would usually do something like this object.array[elementNumber]="something"; how would i do something like this in perl? thanks in advanced. |
|
#2
|
|||
|
|||
|
Can you give an example?
|
|
#3
|
|||
|
|||
|
for instance if i wanted to access an array element within my perl object, it makes senrraye for me to type this.
$object->{arrayName[1]} i would think that this calls the scalar element within object that occurs inside of the array arrayname in C++ i would type this object.arrayName[1] |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > accessing a hash or array within another object |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|