in reply to Please help me with this conditional loop on text entries.

you could perhaps format the input in a first time and stock in your database the IP address in hexadecimal format (?)
#!/usr/bin/perl use strict; use warnings; use Regexp::Common qw /net/; use IO::Prompt; my $ip; # formatting the input while ( $ip = prompt "Enter a valid IP address: ", -until => qr/^$RE{n +et}{IPv4}{-sep=> '.'}$/ ) { print "Your say: '$_'\n"; } # dotted-quad format to hexadecimal my $hex_ip = unpack "H*", pack "C4", split '\.', $ip;
HTH,
PooLpi
ps : sorry for my poor english !

Replies are listed 'Best First'.
Re^2: Please help me with this conditional loop on text entries.
by vsailas (Beadle) on Dec 14, 2007 at 10:03 UTC
    Thank you you guys had been of great help.