Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Perl5 Internal Representation of string variable

by flexvault (Prior)
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
Replies are listed 'Best First'.
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 romping around the Monastery: (17)
As of 2015-07-31 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls