in reply to Re^4: Data::Dumper is returning empty
in thread Data::Dumper is returning empty

Much closer. I had to add a comma to end of that line. Now when it runs I get use of uninitialized value in pattern match (m//) lline 55 and 127 error.

Are you sure you would like to delete all *.bak files that exist in: /emc/cccadm/scripts/perl/etc-test yes/no yes No files were found >>> Oper Sys: linux >>> Platform: RedHat >>> Hostname: ccasec1.centera.lab.emc.com Use of uninitialized value in pattern match (m//) at ./sec-test.pl line 55 (#1) (W uninitialized) An undefined value was used as if it were already defined. It was interpreted as a "" or a 0, but maybe it was a mistake. To suppress this warning assign a defined value to your variables. To help you figure out what was undefined, perl tells you what operation you used the undefined value in. Note, however, that perl optimizes your program and the operation displayed in the warning may not necessarily appear literally in your program. For example, "that $foo" is usually optimized into "that " . $foo, and the warning will refer to the concatenation (.) operator, even though there is no . in your program. Use of uninitialized value in pattern match (m//) at ./sec-test.pl line 127 (#1)

Replies are listed 'Best First'.
Re^6: Data::Dumper is returning empty
by ikegami (Patriarch) on Jan 19, 2010 at 19:46 UTC
    The posted code doesn't have nearly that many lines.

      I posted only section because the script is getting long now<\p>

      line 51 if ($opsys_in =~ /linux/) { and line 123 if ($platform =~ /RedHat/) {

      If you want the entire script should I put it here?

        I changed networkInfo to call getPlatform itself. You probably only implemented half of that change.