Documentation: What is a chunk - exactly? 
Author Message
 Documentation: What is a chunk - exactly?

Hi

When I get:

substr outside of string at try3.pl line 19, <IN> chunk 1

What is a chunk?

C:\home>perldoc -q chunk (or [Cc]hunk)
No documentation for perl FAQ keyword `chunk' found

  use diagnostics;
doesn't help

The Camel book doesn't index 'chunk' and it's not easily visible (ie I
can't see it pp557-597 etc :)

Its not really part of the error is it? It's a term perl uses and I
*think* it means iteration through <> (ie not 'line' because of */ )
but how does it relate to $. ? or does that always count lines, not
chunks? is there a perlvar that tells me the current chunk?

"Where in the docs does it explain what chunk (etc...) *really* (and I
mean **really**) means?"

David

Oh, BTW, since we're on docs:
C:\home>perldoc -q diagnostics
No documentation for perl FAQ keyword `diagnostics' found

C:\home>perldoc -q error (or [Ee]rror)
a bit about sockets, CGI etc but that's all (funnily enough, not only is
use strict missing, it doesn't even mention -w!!)

--
David Greaves                        Enabling
Technical Director, Telekinesys SW     Productivity    W

http://www.*-*-*.com/ ;            the       W E B



Mon, 12 Nov 2001 03:00:00 GMT  
 Documentation: What is a chunk - exactly?


: When I get:
:
: substr outside of string at try3.pl line 19, <IN> chunk 1
:
: What is a chunk?

It's what the value of $. happens to be.  I suppose `chunk' is a bit of
a necessary evil because one doesn't always read files a line at a time.

Greg
--
Nine out of ten men who try Camels prefer women.



Mon, 12 Nov 2001 03:00:00 GMT  
 Documentation: What is a chunk - exactly?

: When I get:

: substr outside of string at try3.pl line 19, <IN> chunk 1

: What is a chunk?

   If you have not changed the $/ special variable, then a
   chunk is a line.

   Can't call it a "line" though, since you might change $/,
   then they wouldn't be lines anymore they would be...
   well... chunks.

   :-)

: Its not really part of the error is it?

   It is helpful information to know what was being read that
   (might have) caused the error messages.

: It's a term perl uses and I
: *think* it means iteration through <> (ie not 'line' because of */ )

   Right (except it's $/ not */)

: but how does it relate to $. ? or does that always count lines, not
: chunks? is there a perlvar that tells me the current chunk?
:  

   No, it always count chunks not lines.

   It is just that the default is for lines to equal chunks.

: "Where in the docs does it explain what chunk (etc...) *really* (and I
: mean **really**) means?"

   I cannot find it anywhere either.

: Oh, BTW, since we're on docs:
: C:\home>perldoc -q diagnostics
: No documentation for perl FAQ keyword `diagnostics' found

   Because -q makes it look only in the FAQs.

   Works fine without the -q

: C:\home>perldoc -q error (or [Ee]rror)
: a bit about sockets, CGI etc but that's all (funnily enough, not only is
: use strict missing, it doesn't even mention -w!!)

   Because -q restricts the search to only 10 of the 50 POD files.

   There is no substitute for doing your own word search on the
   POD files, because the word you are looking for may appear in
   the "body" and not in a "header" line.

--
    Tad McClellan                          SGML Consulting

    Fort Worth, Texas



Mon, 12 Nov 2001 03:00:00 GMT  
 Documentation: What is a chunk - exactly?

Quote:



> : When I get:
> :
> : substr outside of string at try3.pl line 19, <IN> chunk 1
> :
> : What is a chunk?

> It's what the value of $. happens to be.  I suppose `chunk' is a bit of
> a necessary evil because one doesn't always read files a line at a time.

Actually, it was revealed on p5p earlier this month that when the value
of $/ is "\n", the warning _should_ say 'line ###' instead of 'chunk
###'.  Fortunately, this bug has been fixed for future versions of Perl.

<http://www.deja.com/getdoc.xp?AN=472924967>

--
 _ / '  _      /       - aka -

    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."



Mon, 12 Nov 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. how to see exactly what headers are sent in an HTTP request

2. Read exactly n bytes?

3. what exactly does *foo = *bar'foo do.

4. Not Exactly find(1)

5. Using LWP and looking exactly like a web browser

6. Having LWP act exactly like a web browser

7. Checking Input for Exactly 2 numbers

8. How to match exactly x occurrences of a character

9. Newbie questions: What exactly is $_?

10. My first script not doing exactly what I want it to

11. Regexps: Place exactly one space between words

12. #!/usr/bin/perl Where exactly

 

 
Powered by phpBB® Forum Software