Similar issue here, but with a twist. I have an input file that I'm reading in that is pipe delimited. (HL7 actually) So far I have my @record = split (/\|/,$_); I want to take $record[16] and replace it with $record[16] / $record[7] ONLY if $record[7] is not empty. I have this accomplished by $converted = $record[16]; $converted = ($record[16] / $record[7]) unless ($record[7] eq ""); $record[16]="$converted";
At this point I print out @record and it gives correct values.. without the |'s. To get it back into the line of the input file in memory can I just do a print $_, "|" foreach @record; ? or how would I do that exactly? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/