#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    USA
    Posts
    67
    Rep Power
    15
    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. #2
  3. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    Can you give an example?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    USA
    Posts
    67
    Rep Power
    15
    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]

IMN logo majestic logo threadwatch logo seochat tools logo