in reply to Scope of variables

Is $main'ora_errstr same as $main::ora_errstr?
Yes. The comma used to be used a loong time ago!

Replies are listed 'Best First'.
Re^2: Scope of variables
by Nalina (Monk) on Apr 21, 2006 at 06:50 UTC
    Ok Thanks. Could you please tell me the scope of ora_errstr variable here.
      Have a look at package for more info.

      main:: is the default. If there are no other packages that's the one your in and there is no need to include the prefix. If there is a package (e.g. a module) that has a variable of the same name then you would need the package prefix to distinguish between the two.

        Ok. That means both $main'ora_errstr & $ora_errstr belongs to the same package. Then $main'ora_errstr = $ora_errstr doesn't make any sense.
        Actually $main'ora_errstr = $ora_errstr this statement is defined in the subroutine of ora package. This package is being called by many other scripts. Some of the scripts use $ora'ora_errstr & some $main'ora_errstr. I am really confused. Please help me.