Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Why would this code work under one condition and fail for the second condition?

by dark314 (Sexton)
on Jul 26, 2006 at 19:09 UTC ( [id://563869]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    elsif ($adduserargs == 0) {
        #use prompt here...
    ...
                "One or no letters only please"
            );
    
  2. or download this
    sub adduser {
       my $username = generate_user_name( @_ );
    }
    
  3. or download this
    dark314@somebox:~/boxes/scripts/csl-ldap-01$ perl foo.pl -adduser
    First Name: Manuel
    ...
    Please enter middle inital (if it exists): F
    Use of uninitialized value in concatenation (.) or string at foo.pl li
    +ne 98, <STDIN> line 3.
    Created username:
    
  4. or download this
    dark314@somebox:~/boxes/scripts/csl-ldap-01$ perl foo.pl -adduser Manu
    +el,Castillo,F
    Created username: mcastillo        
    dark314@chavez:~/boxes/scripts/csl-ldap-01$
    
  5. or download this
    if (exists $options{adduser} ) {  #if adduser is an argument
        my $adduserargs;
    ...
    }
    
  6. or download this
    #!/usr/bin/perl
    
    ...
        }
        return undef;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://563869]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-19 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found