GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
BibTeX::Parser(3) User Contributed Perl Documentation BibTeX::Parser(3)

BibTeX::Parser - A pure perl BibTeX parser

Parses BibTeX files.

    use BibTeX::Parser;
        use IO::File;

    my $fh     = IO::File->new("filename");

    # Create parser object ...
    my $parser = BibTeX::Parser->new($fh);
    
    # ... and iterate over entries
    while (my $entry = $parser->next ) {
            if ($entry->parse_ok) {
                    my $type    = $entry->type;
                    my $title   = $entry->field("title");

                    my @authors = $entry->author;
                    # or:
                    my @editors = $entry->editor;
                    
                    foreach my $author (@authors) {
                            print $author->first . " "
                                . $author->von . " "
                                . $author->last . ", "
                                . $author->jr;
                    }
            } else {
                    warn "Error parsing file: " . $entry->error;
            }
    }

Creates new parser object.

Parameters:

        * fh: A filehandle

Returns the next parsed entry or undef.

The fields "author" and "editor" are canonized, see BibTeX::Parser::Author

  • BibTeX::Parser::Entry
  • BibTeX::Parser::Author

version 1.02

Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com>

This software is copyright (c) 2013-2016 by Gerhard Gossen and Boris Veytsman

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2021-02-08 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.