Hi all,
Hello,
its time again for me to hassle you, i have my script mostly working, but iv have been bashing my head against a wall trying to fix the last bits...
its a script for extracting data from a file and exporting it to another.
Problems: 1) i keep getting the warning "Use of uninitialized value in numeric eq (==) at ./scanDCI.pl line 122, <DCIFILE> line 28." but it should never execute "./scanDCI.pl line 122" for <DCIFILE> line 28. as thats the DE line...
The reason that all the warnings say "<DCIFILE> line 28" instead of the actual line number is because you are using a foreach loop instead of a while loop.
> foreach my $line (<DCIFILE>) {
Should be:
while ( my $line = <DCIFILE> ) {
2) i get void as the 3rd value in the output ["shelf-1-slot-12-port-1",155520000,void,] but that should be the same as the 2nd value in this case.
It looks like you may have an off-by-one error.
i guess my logic is some what off, could some one please point me in the right direction, for fixing there problems. or even show me how to do all this in one line =) [NOTE sorry if my English is off I'm dyslexic}
[snip]
> dci data file======================================================= > IR,2,<UndefinedContent>,0,12/08/2004,14:02:37,<UndefinedDbName> > > [snip] > > DS,,Elements,
1,"shelf-1-slot-12-port-1",1381514,"port-122.1.13.1",Yes,,,"122:1:13:1",,,,,,alcatelNm-imp-atm-oc3-port.mtf,X.X.X.X,,,Yes,,122:1:13:1,122,1,13,1,"concord",,,AlcatelNm,,label--STM1-XX1234,,alcatelNm-imp-atm-oc3-port.mtf,XX1234,Active,,,155520000,155520000,,,,,,,,,,gmt0bst,,,,,,,,,1,,,,,,,,"sr6d9fgs67097sv",,,,,,
> DE > > /dci data file=======================================================
Is the line following "DS,,Elements," supposed to be on a separate line?
John -- use Perl; program fulfillment
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>