Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Splitting Across Multiple Lines

by ChOas (Curate)
on Mar 13, 2002 at 16:05 UTC ( #151416=note: print w/replies, xml ) Need Help??


in reply to Splitting Across Multiple Lines

Hi!,

Just to give you another option: set the input delimiter ($/)
to a well chosen string in your text file (I would go for "* +"
or something in your case)
Then you can process every server individually:
local $/="* +"; my @Serverlist=<INFILE>; for(@Serverlist) { my ($IPandName,$Protocol,$Server)=split /\n/; #Polish your info here to the real format };
Anyhow.. that`s what I would do, the above code is just
fictional, and untested ;))

GreetZ!,
    ChOas

print "profeth still\n" if /bird|devil/;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://151416]
help
Chatterbox?
[marinersk]: That seems a bit harsh. A newspaper deletes a picture and you respond by deleting a whole city?
[LanX]: yep
[Corion]: First he deleted Bielefeld, now he threatens to delete Darmstadt!
[marinersk]: LOL
[Corion]: People claim that Bielefeld exists, but that's just a ploy to hide LanX's acts!

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2017-05-29 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?