in reply to Re: uninitialized value $_ in pattern match (m//)
in thread uninitialized value $_ in pattern match (m//)

ok I'll use it, mean while I've just updated the code output again.

When I use strict, I get error like this which does not seem to be an issue for me but blocks the execution :(

Global symbol "$file" requires explicit package name at Test.pl line 25.

Execution of Test.pl aborted due to compilation errors.

  • Comment on Re^2: uninitialized value $_ in pattern match (m//)

Replies are listed 'Best First'.
Re^3: uninitialized value $_ in pattern match (m//)
by ikegami (Patriarch) on Jun 23, 2011 at 03:42 UTC

    You read a variable named $file, but you never declared such a variable, much less assigned a value to it.

    I hadn't even seen that one! Goes to show how important use strict; is.

      Thanks a lot for the notification, I fixed it and again ran it and I got the same error n same amount of information :(

      Use of uninitialized value $subfamily in pattern match (m//) at Test.pl line 37, <$list> line 7.

      Use of uninitialized value $_ in pattern match (m//) at Test.pl line 42, <$list> line 7.

      Use of uninitialized value $family in concatenation (.) or string at Test.pl line 44, <$list> line 7.

        Show your new code