~ubuntu-branches/ubuntu/karmic/cgiirc/karmic-updates

« back to all changes in this revision

Viewing changes to docs/decode.pl

  • Committer: Bazaar Package Importer
  • Author(s): Damián Viano
  • Date: 2006-09-30 00:15:44 UTC
  • mfrom: (2.1.2 edgy)
  • Revision ID: james.westby@ubuntu.com-20060930001544-t2jjhvc00rnikdw0
Tags: 0.5.9-2
* Fix postinst by moving chgrp and chmod to build-time
* Cleanup debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/perl
2
 
# (C) 2000 David Leadbeater (cgiirc@dgl.cx)
 
2
# (C) 2000 David Leadbeater (http://contact.dgl.cx/)
3
3
# cgi-irc comes with ABSOLUTELY NO WARRANTY
4
4
# This is free software, and you are welcome to redistribute it
5
5
# under certain conditions; read the file COPYING for details
14
14
use Socket;
15
15
my($input,$output);
16
16
 
17
 
print "Type the Hex IP to decode into a normal IP address\n";
18
 
$input=<>;
 
17
if($#ARGV >= $[) {
 
18
        $input = shift;
 
19
} else {
 
20
        print "Type the Hex IP to decode into a normal IP address\n";
 
21
        $input=<>;
 
22
}
 
23
 
19
24
$input =~ s/[^a-z0-9]//gi;
20
25
 
21
26
$output = pack "H*", $input;