Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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


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 ;))


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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://151416]
[atcroft]: PriNet: Those code bits worked for me, with test hashes, but I didn't test it with more than a few simple test cases. *shrug* Had hoped it would help, at least.
[PriNet]: i think i found the problem, the "source" array that sets the individual key values isn't being cleared, it's keeping the previous values...
[atcroft]: PriNet: You might consider posting a small, self-contained snippet of that segment of your code, and see if someone else has a better idea.....

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2017-06-28 03:12 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (619 votes). Check out past polls.