Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Here's my X-Mas present:

0.80 - 2010-12-24

  • Implement getline_all () and getaline_hr_all ()
  • Fixed another parsing for eol = \r (RT#61525)

0.79 - 2010-11-26

  • Use correct type for STRLEN (HP-UX/PA-RISC/32)
  • More code coverage
  • EOF unreliable when line-end missing at eof

0.78 - 2010-11-26

  • Version 0.77 broke MacOS exported CSV files with only \r

The two new methods:

  • getline_all
    $arrayref = $csv->getline_all ($io); $arrayref = $csv->getline_all ($io, $offset); $arrayref = $csv->getline_all ($io, $offset, $length);

    This will return a reference to a list of getline ($io) results. In this call, keep_meta_info is disabled. If $offset is negative, as with splice (), only the last abs ($offset) records of $io are taken into consideration.

    Given a CSV file with 10 lines:

    lines call ----- --------------------------------------------------------- 0..9 $csv->getline_all ($io) # all 0..9 $csv->getline_all ($io, 0) # all 8..9 $csv->getline_all ($io, 8) # start at 8 - $csv->getline_all ($io, 0, 0) # start at 0 first 0 rows 0..4 $csv->getline_all ($io, 0, 5) # start at 0 first 5 rows 4..5 $csv->getline_all ($io, 4, 2) # start at 4 first 2 rows 8..9 $csv->getline_all ($io, -2) # last 2 rows 6..7 $csv->getline_all ($io, -4, 2) # first 2 of last 4 rows
  • getline_hr_all
    $arrayref = $csv->getline_hr_all ($io); $arrayref = $csv->getline_hr_all ($io, $offset); $arrayref = $csv->getline_hr_all ($io, $offset, $length);

    This will return a reference to a list of getline_hr ($io) results. In this call, keep_meta_info is disabled.


Enjoy, Have FUN! H.Merijn

In reply to Re: The future of Text::CSV_XS - TODO by Tux
in thread The future of Text::CSV_XS - TODO by Tux

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2024-04-16 15:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found