in reply to Copying a value from an element in the ARGV array to a variable...
You need to declare the variable $date outside of either of the blocks created by the if/else statement.
--my $date; if (@ARGV) { $date = 'something'; } else { $date = 'something else'; }
Perl Training in the UK <http://www.iterative-software.com>
|
---|