Use the formal [:hex:] verb for recognizing hex strings.

This has the added bonus of not being case sensitive, which avoids
unneeded surprises with kernel upgrades.

diff -ruN yaird.orig/perl/Base.pm yaird/perl/Base.pm
--- yaird.orig/perl/Base.pm	2005-12-25 06:52:26.000000000 +0100
+++ yaird/perl/Base.pm	2006-03-07 10:26:53.000000000 +0100
@@ -148,7 +148,7 @@
 sub getHexFile ($) {
 	my ($filename) = @_;
 	my $content = getStringFile ($filename);
-	if ($content !~ /^(0x)?[0-9a-fA-F]+$/) {
+	if ($content !~ /^(0x)?[[:xdigit:]]+$/) {
 		fatal ("not a hex file: $filename");
 	}
 	return hex($content);
diff -ruN yaird.orig/perl/CcwDev.pm yaird/perl/CcwDev.pm
--- yaird.orig/perl/CcwDev.pm	2005-12-25 06:52:22.000000000 +0100
+++ yaird/perl/CcwDev.pm	2006-03-07 10:27:30.000000000 +0100
@@ -38,7 +38,7 @@
 	my $cu = Base::getStringFile ("$path/cutype");
 	my $dev = Base::getStringFile ("$path/devtype");
 
-	if ($cu =~ m!^([0-9a-f]{4})/([0-9a-f]{2})$!) {
+	if ($cu =~ m!^([[:xdigit:]]{4})/([[:xdigit:]]{2})$!) {
 		$self->{cu_type} = hex ($1);
 		$self->{cu_model} = hex ($2);
 	}
@@ -46,7 +46,7 @@
 		Base::fatal ("bad content of $path/cutype");
 	}
 
-	if ($dev =~ m!^([0-9a-f]{4})/([0-9a-f]{2})$!) {
+	if ($dev =~ m!^([[:xdigit:]]{4})/([[:xdigit:]]{2})$!) {
 		$self->{dev_type} = hex ($1);
 		$self->{dev_model} = hex ($2);
 	}
diff -ruN yaird.orig/perl/Hardware.pm yaird/perl/Hardware.pm
--- yaird.orig/perl/Hardware.pm	2005-12-25 06:52:28.000000000 +0100
+++ yaird/perl/Hardware.pm	2006-03-07 10:29:53.000000000 +0100
@@ -52,7 +52,7 @@
 		my $abspath = $devicesPath
 			. "/" . join ('/', @components[0 .. $i]);
 		my $modules = undef;
-		if ($abspath =~ m!/pci[0-9a-f]{4}:[0-9a-f]{2}$!) {
+		if ($abspath =~ m!/pci[[:xdigit:]]{4}:[[:xdigit:]]{2}$!) {
 			# PCI bus; harmless
 		}
 		elsif (-f "$abspath/subsystem_vendor") {
@@ -77,34 +77,34 @@
 		elsif ($abspath =~ m!/css0$!) {
 			# S390 Channel SubSystem; harmless
 		}
-		elsif ($abspath =~ m!/css0/0.0.[0-9a-f]{4}$!) {
+		elsif ($abspath =~ m!/css0/0.0.[[:xdigit:]]{4}$!) {
 			# S390 CSS subchannel; harmless.
 			# yes, it really is 0.0., not \d.\d. (kernel 2.6.14)
 		}
-		elsif ($abspath =~ m!/css0/0.0.[0-9a-f]{4}/0.0.[0-9a-f]{4}$!) {
+		elsif ($abspath =~ m!/css0/0.0.[[:xdigit:]]{4}/0.0.[[:xdigit:]]{4}$!) {
 			# S390 CSS device
 			# yes, it really is 0.0., not \d.\d. (kernel 2.6.14)
 			my $dev = CcwDev->new (path => $abspath);
 			$modules = CcwTab::find ($dev);
 		}
 
-		elsif ($abspath =~ m!/[a-f\d]+\.[a-f\d]+:mac-io$!) {
+		elsif ($abspath =~ m!/[[:xdigit:]]+\.[[:xdigit:]]+:mac-io$!) {
 			# Apple bus; harmless
 		}
-		elsif ($abspath =~ m!/[a-f\d]+\.[a-f\d]+:ata-\d+$!) {
+		elsif ($abspath =~ m!/[[:xdigit:]]+\.[[:xdigit:]]+:ata-\d+$!) {
 			# Apple IDE bus; harmless
 		}
-		elsif ($abspath =~ m!/[a-f\d]+\.[a-f\d]+:ohare$!) {
+		elsif ($abspath =~ m!/[[:xdigit:]]+\.[[:xdigit:]]+:ohare$!) {
 			# Another Apple bus; harmless
 		}
-		elsif ($abspath =~ m!/[a-f\d]+\.[a-f\d]+:ATA$!) {
+		elsif ($abspath =~ m!/[[:xdigit:]]+\.[[:xdigit:]]+:ATA$!) {
 			# for stuff like
 			# /sys/devices/pci0000:00/0000:00:10.0/0.f3000000:ohare/0.00020000:ATA
 
 			# Apple IDE bus; harmless
 		}
 
-		elsif ($abspath =~ m!/[a-f\d]+\.[a-f\d]+:mesh$!) {
+		elsif ($abspath =~ m!/[[:xdigit:]]+\.[[:xdigit:]]+:mesh$!) {
 			# Apple SCSI controller,
 			# expected behind a mac-io.
 			# In the kernel, the calls of routine
@@ -309,7 +309,7 @@
 	my $dirName = Base::dirname ($abspath);
 	my $cur = Base::basename ($abspath);
 
-	if ($cur !~ /^([0-9a-f]{4}):([0-9a-f]{2}):([0-9a-f]{2})\.(\d)$/) {
+	if ($cur !~ /^([[:xdigit:]]{4}):([[:xdigit:]]{2}):([[:xdigit:]]{2})\.(\d)$/) {
 		Base::fatal ("Odd PCI directory in sysfs: $abspath");
 	}
 	my $domain = $1;
@@ -323,7 +323,7 @@
 		Base::fatal ("can't open directory $dirName");
 	}
 	while (defined(my $entry = readdir($dir))) {
-		if ($entry !~ /^([0-9a-f]{4}):([0-9a-f]{2}):([0-9a-f]{2})\.(\d+)$/) {
+		if ($entry !~ /^([[:xdigit:]]{4}):([[:xdigit:]]{2}):([[:xdigit:]]{2})\.(\d+)$/) {
 			next;
 		}
 		if (! ($1 eq $domain && $2 eq $bus && $3 eq $slot
diff -ruN yaird.orig/perl/KConfig.pm yaird/perl/KConfig.pm
--- yaird.orig/perl/KConfig.pm	2005-12-25 06:52:27.000000000 +0100
+++ yaird/perl/KConfig.pm	2006-03-07 10:30:12.000000000 +0100
@@ -75,7 +75,7 @@
 		if ($value eq 'y'
 			|| $value eq 'm'
 			|| $value =~ /^-?\d+$/
-			|| $value =~ /^0x[0-9a-f]+$/
+			|| $value =~ /^0x[[:xdigit:]]+$/
 			|| $value =~ /^"[-a-zA-Z0-9@,.:_\/= ]*"$/
 		) {
 			$kConfMap->{$key} = $value;
diff -ruN yaird.orig/perl/SharedLibraries.pm yaird/perl/SharedLibraries.pm
--- yaird.orig/perl/SharedLibraries.pm	2005-12-25 06:52:19.000000000 +0100
+++ yaird/perl/SharedLibraries.pm	2006-03-07 10:30:37.000000000 +0100
@@ -71,21 +71,21 @@
 			#
 			return findLibr ($executable);
 		}
-		elsif ($line =~ m!.* => (/.+) \(0x[0-9a-fA-F]+\)$!) {
+		elsif ($line =~ m!.* => (/.+) \(0x[[:xdigit:]]+\)$!) {
 			#
 			# in ldd 2.3.2 (Debian) output looks like this:
 			# /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7fea000)
 			#
 			push @{$result}, $1;
 		}
-		elsif ($line =~ m!^\s*(/[^\s]+) \(0x[0-9a-fA-F]+\)$!) {
+		elsif ($line =~ m!^\s*(/[^\s]+) \(0x[[:xdigit:]]+\)$!) {
 			#
 			# But ldd 2.3.3 (FC3) has this:
 			# /lib/ld-linux.so.2 (0x0056f000)
 			#
 			push @{$result}, $1;
 		}
-		elsif ($line =~ m!.* =>  \(0x[0-9a-fA-F]+\)$!) {
+		elsif ($line =~ m!.* =>  \(0x[[:xdigit:]]+\)$!) {
 			#
 			# And eg amd64 also has this:
 			#	linux-gate.so.1 =>  (0x00000000)
