OK, this is question N00b, but it puzzled me:
I have the following Perl code:
%project_keys = (
cd => "continuous_delivery",
cm => "customer_management",
dem => "demand",
dis => "dis",
do => "devops",
sel => "selection",
seo => "seo"
);
print "proj_code is $proj_code\n";
while ( ($key, $value) = each %project_keys ) {
if ($key == $proj_code) {
$url = "http://projects/".$project_keys{$key}."/setter";
last;
}
}
$proj_codealways transmitted in the same ('dis'), and the print line shows this.
However, every time I run this, I get a different value for project_keys{$key}.
What (no doubt the obvious) that I am doing wrong? I saw comments about how each “fragile” is what?
source
share