in reply to clear perl hash variable

himanshu.padmanabhi, you're post is confusing. Take a look at How do I post a question effectively?. Taken as it's written, what you're asking is odd - since the Javascript is client-side (browser) and perl is server-side (web server) and the two normally do not run together in the same process -- unless you have some funky Inline thing happening or you're doing something wild like using Javascript to create perl code.

-derby

Replies are listed 'Best First'.
Re^2: clear perl hash variable
by massa (Hermit) on Mar 04, 2009 at 14:36 UTC
    And, anyway, %hash = {} does not do what himanshu.padmanabhi think it does. To clear a hash in perl, we do:
    %hash = ()
    or
    undef %hash
    or, if $hash is a hash reference,
    %$hash = ()
    or, somewhat similarly but not exactly the same,
    $hash = {}
    or, also somewhat similarly but not exactly the same,
    undef $hash
    []s, HTH, Massa (κς,πμ,πλ)