in reply to Pulling lines from file, noob style
Also, use strict and warnings, as they would probably have given you some useful debugging information in this case.while( <SMRT> ){ chomp (); if (/Power_On_Hours(.*)/i) { $hours = $1 ; @time = split(' ',$hours); print "Power on hours = $time[7]\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Pulling lines from file, noob style
by jperkins (Initiate) on Feb 17, 2010 at 17:33 UTC | |
by xyzzy (Pilgrim) on Feb 17, 2010 at 17:43 UTC | |
by johngg (Canon) on Feb 17, 2010 at 22:56 UTC |