in reply to Can't call method "args" without a package or object reference

When Perl sees

args$1

it interprets that as:

args($1)

that is, a function call. You want to have args$1 as a string and to use it as a hash lookup. This means you have to quote it:

"args$1"

Replies are listed 'Best First'.
Re^2: Can't call method "args" without a package or object reference
by almut (Canon) on Apr 08, 2009 at 08:17 UTC
    it interprets that as:
    args($1)

    I think it's rather seeing it as args $1 (indirect method call, like in args SomePkgOrObj). With args($1), it should complain Undefined subroutine &main::args called at...
    </nitpick>

Re^2: Can't call method "args" without a package or object reference
by himanshu.padmanabhi (Acolyte) on Apr 08, 2009 at 07:58 UTC
    Thank you very much. It is solved.