Nik has asked for the wisdom of the Perl Monks concerning the following question:

i'll ry to make it simpler then:
my @titlelist; open FILE, "<$ENV{'DOCUMENT_ROOT'}/data/vault/titlelist.txt" or die $!; @titlelist = <FILE>; close FILE; i try to print popup_menu( -name=>'title' -values=>\@titlelist ) but it return nothing.
if i try to print @titlelist is filled though...

Replies are listed 'Best First'.
Re: Trying to populate a popup_menu
by shmem (Chancellor) on May 05, 2007 at 08:17 UTC

    Please reformat your post.

    print popup_menu( -name=>'title' -values=>\@titlelist )

    Is that your exact code? There's a comma missing between 'title' and -values.

    You do have strict and warnings enabled, don't you?

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
    A reply falls below the community's threshold of quality. You may see it by logging in.
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Trying to populate a popup_menu
by FunkyMonk (Bishop) on May 05, 2007 at 08:26 UTC
    Does the html look ok if you run your code from the command line?
    Does chomping your input make any difference?
    Do you know that print popup_menu( -name=>'title' -values=>\@titlelist ) is missing a comma?
Re: Trying to populate a popup_menu
by blazar (Canon) on May 05, 2007 at 12:55 UTC
    i'll ry to make it simpler then:

    Than what?!? /me answers to hisself: you can't barely copy and paste a clpmisc post taking it out of the context of the thread it's part of. It is plainly annoying. As it is the fact that you continue not to include any reference about the fact that you're doing so. You wrote you would. But you don't. Hence you're a liar. And an irrespectful person, since you also wrote that you would have been more careful when writing your posts. You aren't. They continue to be a pita to read notwithstanding the fact that people told you they are. Hence you're doubly a liar, and intentionally being a pita.