in reply to Re^3: left justify/pad hex value
in thread left justify/pad hex value
Thanks for the help!#!/usr/bin/perl use strict; use warnings; my $data = '10.34.2.252'; my @values = split('\.', $data); foreach my $val (@values) { $val = sprintf("%02x", $val); print $val; } print "\n"; exit 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: left justify/pad hex value
by cdarke (Prior) on Mar 03, 2010 at 20:38 UTC |