in reply to problem with exists

Sorry, but without an error message or more information on the problem I don't think there is anything to be done. I have a couple suggestions though:

  1. Indent your code - It makes it much easier and much clearer when dubugging
  2. on this line if(exists $whop{'$onname'}){...}, I would suggest using no quotes because single quotes do not allow variable interpolation. So it probably should be if(exists $whop{$onname}){...}.

Other than that, I do not know. I hope I helped :)

Almost a Perl hacker.
Dave AKA damian

I encourage you to email me

Replies are listed 'Best First'.
Re: Re: problem with exists
by tanger (Scribe) on Feb 24, 2001 at 10:25 UTC
    Hello, I took the '' off.

    There were no error messages, just the fact that the code didn't work. I also just looked in the chatter box and saw this:

    crazyinsomniac> ok here goes my standard rand: tanger you bastard, be very very detailed when asking a question, and don't leave out the why/what/who/where /when/how and be sure to provide plenty of sample data

    Well I have teen online community where members could login and build there personal homepage, talk, and other member features. What I'm trying to do is when a new member signs up and logs in I want there name to be shown as, let say

    Vegeta33*

    The * indicates that theyre on. That member name would be in a table where includes new members. If you look at my first post it has the code on how to do this.

    Some how It does not work and I'm stuck once again.

    Anthony
      When reading lines from a file, it's usually necessary to chomp them before using them as hash keys, as they often have newlines.

      You could insert a debugging line in your foreach loop:

      print STDERR "Name is ->$onname<-\n";

      The extra punctuation will make any whitespace rather visible. chomp is probably exactly what you need, like chomp @newest_members; or chomp $onname;