in reply to file open with variables
use strict; use warnings; use Test::Simple tests=>1; # Expected # my $expected_file_name = 'D:\PROJ\N123_X3\dataInfo_X-4_Y5_decode.csv'; # Given my $X_info = 3; my $Y_info = -4; my $Z_info = 5; my $concatenated_name = 'D:\PROJ\N123_X' . $X_info # 3 . '\dataInfo_X' . $Y_info # -4 . '_Y' . $Z_info # 5 . '_decode.csv' ; ok($concatenated_name eq $expected_file_name, 'concatenation');
OUTPUT:
1..1 ok 1 - concatenation
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: file open with variables
by AnomalousMonk (Archbishop) on Sep 28, 2022 at 23:10 UTC |