sub list_pci { open (FILE, "/proc/pci") or die "Cannot open /proc/pci. \n Do you have permission to access this file?"; for $linepci () { if ($linepci =~ /Multimedia audio controller/g) { print $linepci; } } # close FILE; } sub list_modules { open (FILE, "INSTALL") or die "Cannot open INSTALL. \n Do you have permission to access this file?"; for $linemodule () { if ($linemodule =~ /\.o$/) { print $linemodule; } } # close FILE; } # Output to shell list_modules(); print "\n The modules for the following card/s can be found in the above.\n If your card is not listed below it means it is a PNP (very old)\n or USB card and this script cannot find it.\n\n The modules for ALSA USB support are: \n\n \tsnd-usb-audio\n \tsnd-usb-midi\n\n"; print " These are the cards found on your system:\n\n"; list_pci(); print "\n";