Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Net::Whois::Raw qw( whois );

by quester (Vicar)
on Apr 21, 2009 at 01:26 UTC ( #758853=note: print w/ replies, xml ) Need Help??

in reply to Net::Whois::Raw qw( whois );

Normally HTML ignores newlines. There are (at least) two simple ways of including output from a Unix command.

One is to enclose the output in <pre> and </pre>, so that

newlines, like this one -->
are not ignored.
It also tells the browser to use a monospaced font,
so that text in         columns
will line up            correctly.

On the other hand, you may decide that the monospaced text looks kind of ugly.

The other way is to enclose each line in the HTML sequence <p> ... </p> like this (caution: not tested):

$whois =~ s{^}{<p>}mg; $whois =~ s{$}{</p>}mg;

Comment on Re: Net::Whois::Raw qw( whois );
Download Code
Replies are listed 'Best First'.
Re^2: Net::Whois::Raw qw( whois );
by Anonymous Monk on Aug 24, 2009 at 18:35 UTC

    replace the \n with <br/>

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://758853]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2015-11-27 12:29 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (727 votes), past polls