in reply to parameter passing problem

G'day gokhan,

Welcome to the monastery.

You've written both test_filelist_format() and test_format() as instance methods. If that's what they're supposed to be, you should invoke them like this:

$object->method(@args)

If they're supposed to be just normal subroutines, you'd call them like this:

function(@args)

and you should remove this line:

my $obj = shift;

You haven't shown sufficient code for me to advise which way around these should be: I see no use of $obj in either but you've omitted code from both so maybe $obj is used where you've shown "...". Regardless, that should be enough information for you to fix your current problem. I'd recommend you look in other parts of your code for similar issues.

-- Ken

Replies are listed 'Best First'.
Re^2: parameter passing problem
by gokhan (Initiate) on Jul 03, 2013 at 09:20 UTC
    $obj is not important for here. Because it gives error before coming to lines of $obj usage. I've updated the code. I added both the lines for $obj and args2hash function.
Re^2: parameter passing problem
by gokhan (Initiate) on Jul 03, 2013 at 12:55 UTC
    Sorry, I didn't know the function of "shift". I am new in Perl. Ok, the problem may be the shift operation.
      Perl documentation is available online (shift) and at your command prompt:
      perldoc -f shift
Re^2: parameter passing problem
by gokhan (Initiate) on Jul 03, 2013 at 13:03 UTC
    problem solved :) thanks for advise