in reply to Problems with passing arguments to a subroutine in a perl package

Glad to be here! edit: Nevermind on my previous success.
The error that I'm getting is Use of uninitialized value in concatenation (.) or string at Utilities/utilities .pm line 374.
The uninitialized value is referring to the $deviceinfo variable.
I am using strict...but even when I tried your method of exporting the subroutine it still did not work. When I tried that perl did not recognize the subroutine.

Thanks for your help
  • Comment on Re: Problems with passing arguments to a subroutine in a perl package

Replies are listed 'Best First'.
Re^2: Problems with passing arguments to a subroutine in a perl package
by Anonymous Monk on Jul 17, 2013 at 03:57 UTC
    Its got nothing to do with "subroutines being recognized", you got undef, that is all.

    If you want more help post code that reproduces the problem, a Short, Self Contained, Compilable, Example like

    #!/usr/bin/perl -- use strict; use warnings; use diagnostics; Main( @ARGV ); exit( 0 ); sub Main { my $fb = Foo::Bar(3); $fb++; print "$fb\n"; } sub Foo::Bar { my( $i , $eeb ) = @_; return $eeb + $i; } __END__