Re: /proc/cpuinfo consistency

Brandon S. Allbery KF8NH (allbery@kf8nh.apk.net)
Mon, 21 Sep 1998 18:02:09 -0300


In message <Pine.LNX.4.02.9809211051380.5538-100000@neko.binary9.net>,
"Nichola
s J. Leon" writes:
+-----
| On Mon, 21 Sep 1998, Jauder Ho wrote:
| # bad boy, always use chomp() :)
|
| :) And use
| while (defined($_=<>)) {
+--->8

If you're really paranoid:

use IO::File;
$f = IO::File->new($ARGV[0], O_RDONLY) or die "can't open $ARGV[0]: $!\n";
while (defined ($_ = $f->getline)) {
chomp;
# ...
}

-- 
brandon s. allbery	[os/2][linux][solaris][japh]	 allbery@kf8nh.apk.net
system administrator	     [WAY too many hats]	   allbery@ece.cmu.edu
electrical and computer engineering					 KF8NH
carnegie mellon university

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/