in reply to Expanding a variable

Use double quotes, but also double backslashes, ie "Z:\\My Documents\\Workspace\\$test.csv"

See also: perlsyn.

Somtimes use warnings is helpful here.

Perl 6 - links to (nearly) everything that is Perl 6.