Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Can a defined value be of zero length?

by tobyink (Abbot)
on Apr 19, 2014 at 09:21 UTC ( #1082878=note: print w/ replies, xml ) Need Help??


in reply to Can a defined value be of zero length?

use strict; use warnings; my $value = q(); printf("Here is a string: \"%s\"\n", quotemeta($value)); printf("Is it defined? %s\n", defined($value) ? "Yes" : "No"); printf("What is its length? %d\n", length($value));
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name


Comment on Re: Can a defined value be of zero length?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (17)
As of 2014-11-24 15:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (142 votes), past polls