in reply to variable scopes in Excel::Writer::XLSX

Maybe this simplified code can help you isolate your problem:
use strict; use warnings; use Excel::Writer::XLSX; my $file = (@ARGV) ? 'perl_bug.xlsx' : 'perl_good.xlsx'; my $book = Excel::Writer::XLSX->new($file); my $worksheet = $book->add_worksheet(); $worksheet->write( 0, 0, 'Hi Excel!' );

Replies are listed 'Best First'.
Re^2: variable scopes in Excel::Writer::XLSX
by johnrcomeau (Novice) on May 25, 2013 at 03:11 UTC
    Thanks, but the code I posted was not written to be the most concise and direct way to perform a task. It was written to demonstrate the error that I found. It may be oddly structured as a result. The choice of file names is really secondary to the problem.