[ic] UserTag problem
marxy@indoors.kiev.ua
marxy@indoors.kiev.ua
Tue, 14 Nov 2000 19:52:34 +0200
Hello!
I want to write a UserTag but I got something wrong.
My UserTag looks as follows and wonders to get a directory list of
another directory:
===============================================
UserTag dirlist Order name
UserTag dirlist Routine <<EOR
sub {
my $dn=shift;
my @outf;
my (@files) = glob("$dn/*");
for(@files) {
if (-d $_) {
push (@outf, $_);
next;
}
}
return @outf;
}
EOR
=================================================
Then I tried to use it:
[tmp dir]
[dirlist name='configdir']
[/tmp]
[perl]
$return = '';
my @list=$Scratch->{d};
for(@list) {
$return .= "dir = " . $_ ."<BR>";
}
return $return;
[/perl]
=================================================
Well, this returns something like:
dir=6
I discrouraged... 6 is a count of the directories in 'configdir'
Can anybody helps me to answer where did I get wrong?
--
Albert Marx.