Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Perl5 Internal Representation of string variable

by flexvault (Parson)
on Oct 02, 2010 at 17:37 UTC ( #863091=note: print w/ replies, xml ) Need Help??


in reply to Re: Perl5 Internal Representation of string variable
in thread Perl5 Internal Representation of string variable

re: ". . .bytes in memory terminated by a x00 byte. "

In 'C' => 'YES', in Perl => 'want to know???'

Either perl has a count of characters for variable or some other mechanism to determine the size of the variable that contains a group of bytes. Can't use x00 as terminator, since perl wonderfully allows x00 to be a valid byte.


Comment on Re^2: Perl5 Internal Representation of string variable
Re^3: Perl5 Internal Representation of string variable
by Marshall (Prior) on Oct 02, 2010 at 17:52 UTC
    Yes, indeed,
    my $string = "asdf \x00 some more";
    print $string;
    does print past the asdf. So, a Perl string does know "how big it is".

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2014-12-29 15:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (192 votes), past polls