Parse an IP Address: Difference between revisions

Content added Content deleted
(→‎{{header|Perl 6}}: Now parses '::' correctly)
m (→‎version 1: edlied scroll from PRE tag, used a template for the output section.)
Line 2,362: Line 2,362:
say left(a,30) right(hx,32) right(x2d(hx),39) ' IPv' || (6-2*dot) right(port,5)
say left(a,30) right(hx,32) right(x2d(hx),39) ' IPv' || (6-2*dot) right(port,5)
return</lang>
return</lang>
'''output''' using the default input
{{out|output|text=&nbsp; when using the internal default input:}}
<pre>
<pre style="overflow:scroll">
input IP address hex IP address decimal IP address space port
input IP address hex IP address decimal IP address space port
────────────────────────────── ──────────────────────────────── ─────────────────────────────────────── ───── ─────
────────────────────────────── ──────────────────────────────── ─────────────────────────────────────── ───── ─────