Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: if (empty record set)

by Mr. Muskrat (Canon)
on Jun 26, 2003 at 14:57 UTC ( [id://269256]=note: print w/replies, xml ) Need Help??


in reply to if (empty record set)

if (@bkmark == 0) { or even if (scalar @bkmark == 0) {

length is for use on scalar values. In fact, perlfunc says this about length:
"length EXPR
Returns the length in characters of the value of EXPR. If EXPR is omitted, returns length of $_. Note that this cannot be used on an entire array or hash to find out how many elements these have. For that, use scalar @array and scalar keys %hash respectively."

Update: Two different approaches to the same problem. Heh.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-20 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found