develooper Front page | perl.libwww | Postings from December 2000

reference-question

Thread Next
From:
daneman
Date:
December 27, 2000 15:51
Subject:
reference-question
Message ID:
LPBBIFDIBFGHOAPFPLOEGEONCCAA.daneman@planet.nl
Hello,

I hope I can make my problem clear:

I have these 4 lines (as an example):

$files{'file1'}=['http://www.f1a.com','http://www.f1b.com','http://www.f1c.c
om'];
$files{'file2'}=['http://www.f2a.com','http://www.f2b.com','http://www.f2c.c
om'];
$dir{'somedir'}=\%files;
$links[xx]=\%dir;

By doing this I attempt to make a 4 dimensional list of links from an
(unknown) number of files within an (unknown) number of directories in an
(unknown) number of directory-levels.
This way I could point to any of the links in the list with:

$somelink = $links[dirlevel]{dirname}{filename}[linknumber];

My questions are:

When I say:

print @{$links};

nothing happens. I don't get an errormessage but there's nothing printed on
the screen neither.
Supposing the rest of the script is ok (contenttype etc), what do I do
wrong?
I also failed to get the values of '%dir':

foreach $key (%{$dir})
	{
	print "$key: ".${$dir}{$key};
	}
In general my question is: how do I get the values of each of the indexes of
@links?

Thanks in advance,

Daneman.




Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About