in reply to Why does this code break if I properly set the scope?

I tried this. Maybe it'll help:

#!/usr/bin/perl use strict; use warnings; use diagnostics; my $n=0; for my $el (my @products) { if ( exists $products[$n]{'Vendor Item ID'} ) { my $m = 0; for my $el (my @config) { if ( exists $config[$m]{'Vendor'} ) { if ( $config[$m]{'Vendor'} =~ /$products[$n]{Name}/ ) +{ my $url= $config[$m]{'URL'}; $url=~ s/\*/$products[$n]{'Vendor Item ID'}/g; $products[$n]{'TaggedID'} = $url; } } ++$m; } } ++$n; }