Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > strange replacement of . and , with octal counterpart
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 22nd April 23:01
kermit.lowry
External User
 
Posts: 1
Default strange replacement of . and , with octal counterpart



The following code produces fine result when everything is hard wired
but replaces '.' and ',' with there octal counterparts when the
variables are passed to it. Can't figure out why. I would appreciate
if anyone could shed some light to the darkness.
ex.

hard wired
kermit.lowry,food

Passed variables
kermit\056lowry\054food

TIA,

Kermit


#!/usr/bin/perl
$pid=shift;
open DATA, "/usr/local/data/mra/archive/${pid}Diagnosis.dat"
or die "Can't open this file!";

open REMINDER, ">>/usr/local/data/mra/archive/${pid}Reminder.dat"
or die "Can't open this file !";

open CHRONIC, ">>/usr/local/data/mra/archive/${pid}Chronic.dat"
or die "Can't open this file !";

open ACUTE, ">>/usr/local/data/mra/archive/${pid}Acute.dat"
or die "Can't open this file !";

while ($line = <DATA>){
(
$last_seen,
$description,
$code,
$first_noted,
$times_seen,
$provider,
$mra_prvlge_flag,
$priority_flag,
$reminder_flag
)
= split("~",$line);
if ($reminder_flag =~1) {
if ($priority_flag =~1) {
print REMINDER $line;
} else {
print CHRONIC $line;
}
} else {
if ($priority_flag =~1) {
print CHRONIC $line;
} else {
print ACUTE $line;
}
}
}
close DATA;
close REMINDER;
close CHRONIC;
close ACUTE;
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666