in reply to Re^2: Uninitialized scalar inside a scalar?
in thread Uninitialized scalar inside a scalar?
If I'm not missing something you can generalize the principle to any number of parameters. Parameters you don't need are undef or garbage, but that should not matter
$searchString = "(T)(est).(.{2}).*"; $outputString = 'This $3 a $1$2'; $sampleData = "Test is good"; if ($sample_data =~ m/$search_string/) { say $make_output_string->($1,$2,$3,$4,$5,$6,$7,$8); }
|
|---|