in reply to Re^3: share array of hashes between main program and thread
in thread share array of hashes between main program and thread

are the two command equivalent?
$Array[ $i ]{ newKey } = 'newValue' $Array[ $i ]{ newKey }->'newValue'
thanks

Replies are listed 'Best First'.
Re^5: share array of hashes between main program and thread
by BrowserUk (Patriarch) on Nov 11, 2009 at 12:01 UTC
    are the two command equivalent?

    Not even slightly, as the latter is illegal syntax:

    perl -mstrict -cwle"$Array[ $i ]{ newKey }->'newValue'" String found where operator expected at -e line 1, near "->'newValue'" (Missing operator before 'newValue'?) syntax error at -e line 1, near "->'newValue'" -e had compilation errors.

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.