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'; }
--
<http://www.dave.org.uk>

Perl Training in the UK <http://www.iterative-software.com>

  • Comment on Re: Copying a value from an element in the ARGV array to a variable...
  • Download Code