#!/usr/bin/perl # http://perlmonks.org/?node_id=1206349 use strict; use warnings; print "Enter the IP address\n"; my $tunip = <STDIN>; chomp ($tunip); print $tunip =~ s/\d+$/ ($& - 1 ^ 1) + 1 /er, "\n";
Updated conversion
Updated again
In reply to Re: Need to calculate IP address
by tybalt89
in thread Need to calculate IP address
by ddrew78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |