Hi Thomas,

> If you "use strict;" you may not use symbolic references, i.e. (mis)use
> a variable's name to create a reference to it. That's why I fixed your
> code
> by replacing the variable names with references to the variable I
> assumed you'd wish to address.
> 
> Maybe you should take a look at the perlref manpage (e.g.
> http://perldoc.perl.org/perlref.html) for a better explanation.
> 
> As for putting in a literal 'mvb' that was just to demonstrate the
> usage. Of course you can replace that with any expression evaluating to
> any key of %stp_dirs or whatever.

Thanks for your explanation and the reference to perldoc, I understand now. But 
it doesn't work yet, I still get the same error. I have altered my source now 
as follows:

my %stp_dirs = ( "mvb" => "\%mvb_dirs",
                                        "pkv" => "\%pkv_dirs",
                                        "av" => "\%av_dirs",
                                        "be" => "\%be_dirs",
                                        "vvw" => "\%vvw_dirs" );
[...]
my ($sdir, $tdir);
while (($sdir,$tdir) = each %{$stp_dirs{$stp}}) {
        DEBUG("SourceDir: $sdir\t\tTargetDir: $tdir\n");
}

Did I misunderstand anything?

Cheers,
Nora


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to