Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Split file

by bichonfrise74 (Vicar)
on Nov 09, 2009 at 18:03 UTC ( #805975=note: print w/replies, xml ) Need Help??


in reply to Split file

You can try something like this.
#!/usr/bin/perl use strict; while (<DATA>) { if (/\.\.DN:\n/ ... /(\w+)\n/ ) { print "$1\n" if $1; } } __DATA__ ..DN: 000044255 ..CB: ..SN: D046H6J5 ..PD: 20091030 ..DD: Friday, October 30, 2009 ..PY: 2009 ..ED: ..DN: 000044254 ..CB: ..SN: D046H6IR ..PD: 20091030 ..DD: Friday, October 30, 2009 ..PY: 2009 ..ED:

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://805975]
help
Chatterbox?
and the monks are chillaxin'...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2018-06-21 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (117 votes). Check out past polls.

    Notices?