#!/usr/bin/perl

#
# IPv4-mapped IPv6 address
#

use strict;

foreach my $IPv4 (@ARGV) {
	if ($IPv4 =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/) {
		my(@d) = split(/\./, $IPv4);
		printf("0:0:0:0:0:ffff:%02x%02x:%02x%02x\n", $d[0], $d[1], $d[2], $d[3]);
	}
}
