in reply to Error with using structs as subroutine parameters

You are using $ARGV[0] in your subroutine. That is the first command-line argument to the program, not the parameter to the subroutine. Did you mean that? Arguments are passed into a sub through @_, not @ARGV.

If not, then use one of the following (TMTOWTDI):
$mystruct = shift; # defaults to @_ in a sub ($mystruct) = @_; # copies the first element into $mystruct $mystruct = $_[0]; # Ugly, and possibly misleading

Replies are listed 'Best First'.
Re^2: Error with using structs as subroutine parameters
by dellnak (Initiate) on Jun 08, 2009 at 09:08 UTC
    Thanks, this solved the problem. As I feared it was a true noob error after all.