lkml.org 
[lkml]   [1998]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: /proc/cpuinfo consistency
Date
From
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/

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.070 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site