Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Understanding this code

by Ea (Chaplain)
on Sep 28, 2015 at 09:24 UTC ( [id://1143216]=note: print w/replies, xml ) Need Help??


in reply to Understanding this code

Small problem with this line
print "Total element in idslist = $#idslist\n";
Your array index starts at 0 (unless you've set $[ = 1. You haven't, have you?) and $#idslist points to the last index of @idslist, so you haven't counted the first element. I prefer to evaluate @idslist in scalar context to get the total number, so I would write
print "Total element in idslist = ", scalar @idslist, "\n";
or something similar.

Sometimes I can think of 6 impossible LDAP attributes before breakfast.

http://ldapcon.org/2015 is just an excuse to enjoy November in sunny Edinburgh

Replies are listed 'Best First'.
Re^2: Understanding this code
by Anonymous Monk on Sep 28, 2015 at 09:36 UTC

    or something similar

    double your productivity like homer, type int instead

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-23 07:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found