Re: read a paragraph via scrit?

Discussion in 'Perl' started by Anno Siegel, Apr 1, 2004.

  1. Anno Siegel

    Anno Siegel Guest

    NNTP <> wrote in comp.lang.perl.misc:
    > I'd lile to read the following file and output everything from
    > 'NetBIOS Name Table for Host 192.168.5.10' to the first occurance of
    > "----------------------------------------"
    >
    > can perl do that? here is the file (long file but only the portion of
    > it is shown here)
    >
    >
    >
    >
    > ----------------------------------------
    > data
    > data
    > ----------------------------------------
    > NetBIOS Name Table for Host 192.168.5.11
    > lines1
    > line2
    >
    > Adapter address: 00-00-00-00-00-00
    > ----------------------------------------
    >
    > NetBIOS Name Table for Host 192.168.5.10
    >
    > Adapter address: 00-a8-34-35-c3-aa
    > ----------------------------------------
    > more data
    > more data
    > ----------------------------------------


    Make the line of dashes the record terminator:

    $/ = "----------------------------------------\n";
    /\QNetBIOS Name Table for Host 192.168.5.10/ and print while <DATA>;

    Anno
    Anno Siegel, Apr 1, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Heavey

    Paragraph Name

    Jim Heavey, Dec 3, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    458
    Jim Heavey
    Dec 4, 2003
  2. MW de Jager

    HTML Paragraph question

    MW de Jager, Jul 6, 2005, in forum: ASP .Net
    Replies:
    9
    Views:
    464
    John Timney \(ASP.NET MVP\)
    Jul 6, 2005
  3. ad
    Replies:
    4
    Views:
    405
    UT-BadBoy
    Feb 23, 2006
  4. Francois LE DORNER

    swing - styled document - paragraph attribute

    Francois LE DORNER, Mar 8, 2005, in forum: Java
    Replies:
    0
    Views:
    408
    Francois LE DORNER
    Mar 8, 2005
  5. dorayme
    Replies:
    112
    Views:
    2,715
    dorayme
    Mar 30, 2009
Loading...

Share This Page