in reply to How to combine string and digits in perl
See How to ask better questions using Test::More and sample data
use strict; use warnings; use Test::More tests => 2; my $abc = 'dgrs'; my $n = 1; my $want = 'dgrs_1'; my $have = ''; $have = $abc . '_' . $n; is $have, $want, 'Concatenation operator (perldoc perlintro)'; $have = "${abc}_$n"; is $have, $want, 'String interpolation (perldoc perlop)';
I also strongly recommend that you pick an indentation scheme and stick to it. Random whitespace is doing you no favours.
🦛
|
|---|