in reply to hash as subroutine argument

Did you try perl -c scriptname?

Did you try it with use strict; use warnings;?

Either would give you some significant hints.

Replies are listed 'Best First'.
Re^2: hash as subroutine argument
by Anonymous Monk on Jul 03, 2009 at 04:36 UTC
    yeah i though i will first do with the logic and then use the strict and warning module.
      Wrong!

      As your code demonstrates, doing the logic avails nothing if the syntax is wrong. Use strict and warnings as intended -- as helpers -- to get the syntax right, so you can tell if the algorithm you've selected|developed\whatever produces what you intended.

      If your code won't compile, you'll never know if you've got the logic right.