Ramón Chávez wrote: > Thank you very much guys. > > Rob, sorry but it didn't work > > open (DATOS, "$bd") || die "Error: no se puede abrir el > archivo"; > > while ($registro=<DATOS>) {}
Hi Ramon, The empty brackets in the line above were meant to represent the whole body of the loop. All the code that comes after this comes after $registro has been assigned a null value, so of course it will not work in the split. You really made a big leap here. > ($file, $vot_tot, $ult_vot, $sum_vot) = split(/:/,$registro); > > $lineas = $.; > close (DATOS); At your last post, you were having trouble get the line assigned, and now you're trying to break it down into a complicated structure without checking to see if it was assigned correctly. Before you try to split the line into an array, print it out, and see what you have to work with: print "registro is now $registro\n"; In the case above, you would find that: registro is now which would tell you that the value got lost along the way. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]