From: <er...@he...> - 2002-10-31 17:29:02
|
On Thu, Oct 31, 2002 at 08:50:51AM -0800, Joshua J. England wrote: > On Thu, 2002-10-31 at 09:23, er...@he... wrote: > > On Wed, Oct 30, 2002 at 06:26:35PM -0300, Luiz Ot=E1vio de Lima Rodri= gues wrote: > > > Another problem is when I compel beoboot. An error happens that I > > > do not obtain to arrange of form some: =20 > > >=20 > > > (cat config.boot.in; /mkpcitable </usr/share/hwdata/pcitable) > co= nfig.boot > > > Split Loop, < STDIN > line 10. make: * * * [ config.boot ] Error = 255 > >=20 > > I saw this too as soon as I tried Red Hat 8.0. There seems to be som= e > > new brain damage related to internationalization. I said "unset LANG= " > > and it worked again. The script is so simple I can't imagine there's > > actually a bug in it. >=20 > perl 5.8 claims that implicitly splitting into the @_ array is > deprecated as it can clobber any subroutine arguments. I experienced > the same problem, but fixed it by splitting into an explicit array: <SARCASTIC RANT> Oh, of course! I don't know why I didn't parse "Split loop" as implicit use of @_ is deprecated. Silly me. I'm sure if I were a real 'l3et perl HaX0r, I'd know that deprecated meant "unset LANG". Stupid perl. </SARCASTIC RANT> Seriously, though, thanks for the fix. Incidentally, explicitly doing "$@ =3D split /[\t\n]/;" makes it work fine too. - Erik > #!/usr/bin/perl > # > # Create a config.boot from a redhat style pci table. > # > # $Id: mkpcitable,v 1.4 2002/06/04 14:07:50 packager Exp $ > while (<STDIN>) { > s/\#.*//; # Strip comments > @a =3D split /[\t\n]/; > if ($#a =3D=3D 3 || $#a =3D=3D 5) { > ($vendor, $device, $driver) =3D (hex($a[0]), hex($a[1]), $a[$#a - 1]); > $driver =3D~ s/\"//g; > printf("pci 0x%04lx 0x%04lx %s\n", $vendor, $device, $driver) > unless ($driver =3D~ m/^unknown/i || > $driver =3D~ m/^ignore/i || > $driver =3D~ m/^Card:/i || > $driver =3D~ m/^Server:/i ); > } > } |