Guest User

Untitled

a guest
Sep 14th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. while(my $ip = shift(@ARGV)){
  4. my @parts = split /\./, $ip;
  5. my $sum = 0;
  6.  
  7. $sum += $parts[$_] * (1 << 8*(3-$_)) for (0..3);
  8.  
  9. print "$sum\n";
  10. }
Add Comment
Please, Sign In to add comment