in reply to Re^2: Check your wits
in thread Check your wits
Before. I took the approach of identifying difference with what I would do. I immediately saw two things: code before functions, and use of exit. I looked if there was more code below exit, and voila!
The fix is to add one word:
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; _test(); exit; ######## subroutines BEGIN { <----- my @values = qw( 1 2 3 ); sub _test { print "Values:\n", Dumper( \@values ); } }
|
|---|