[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[ic] UserTag problem
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.
_______________________________________________
Interchange-users mailing list
Interchange-users@www.minivend.com
http://www.minivend.com/mailman/listinfo/interchange-users