in reply to Re^2: Can't use undefined variable as a symbol reference
in thread Can't use undefined variable as a symbol reference

Use a counter. Once counter equals 30, exit loop.
  • Comment on Re^3: Can't use undefined variable as a symbol reference

Replies are listed 'Best First'.
Re^4: Can't use undefined variable as a symbol reference
by soonix (Chancellor) on Feb 09, 2015 at 14:33 UTC
    plus you can let perl do the counting. See perldoc perlvar, search for "$." or "input_line_number".