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,fo od
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.d at"
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_fla g,
$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; 0 1374 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Erik Johnson |
last post by:
This is somewhat a NEWBIE question...
My company maintains a small RDBS driven website. We currently generate
HTML using PHP. I've hacked a bit in Python, and generally think it is a
rather cool language. I've done Perl and like it, there are a few features
of PHP I like but overall am not too excited about it. I have found PHP's
strtotime() function to be quite flexible and handy and we make liberal use
of it.
I have not yet really...
|
by: Sean McIlroy |
last post by:
I recently found out that unicode("\347", "iso-8859-1") is the
lowercase c-with-cedilla, so I set out to round up the unicode numbers
of the extra characters you need for French, and I found them all just
fine EXCEPT for the o-e ligature (oeuvre, etc). I examined the unicode
characters from 0 to 900 without finding it; then I looked at
www.unicode.org but the numbers I got there (0152 and 0153) didn't
work. Can anybody put a help on me wrt...
|
by: WindAndWaves |
last post by:
Hi Gurus
The page below has a strange error. It seems to be working very well, just
when you enter 8 or 9 for day, month or year then you get an error. I
really have no idea where that is coming from. Can you help?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
|
by: fuch6921 |
last post by:
I want to read in an Octal number argument and have it stored as an
octal number. For instance the user will type: ./a.out 777 and it
will store the octal number 777. But it atoi does this as an interger,
and sscanf gives me 0.
|
by: Webdiyer |
last post by:
Hi,
We all know that the return value of Math.Log(8,2) is 3,but how about
(int)Math.Log(8,2)? On my machine,the return value of (int)Math.Log(8,2) is
strange enough! it's not 3 but 2 ! I've tested other values such as
(int)Math.Log(16,2),(int)Math.Log(4,2),(int)Math.Log(32,2)...et, they all
return the same value as their counterpart Math.Log() methods,only
(int)Math.Log(8,2) is incorrect,is this a .net bug ? I've also tested...
| |
by: joe.hrbek |
last post by:
Hello everyone, I'm experimenting with python and i'm following this
tutorial:
http://docs.python.org/tut/node6.html#SECTION006400000000000000000 I'm
in section 4.7.5 Lambda Forms. In this section I was working along and
I noticed something strange. It happened because of a typo. Below is
a copy/paste from my idle session:
>>>def make_incrementor(n):
return lambda x: x+n
|
by: Gary Brown |
last post by:
Hi,
I have a whole bunch of integer constants that are best given in octal
(PDP-1 opcodes). It makes a huge difference in readability and authenticity
if these
can be entered in octal. I haven't found a way to do this. Is there one?
Thanks,
Gary
|
by: laurent.pauloin |
last post by:
Hello,
I would like to print a signed octal.
With a signed short it's printf %hi but what about an octal ?
Tk !
|
by: notahipee |
last post by:
I have been trying to cin an number from 0 to 9 with a leading 0. For
example 00 or 07. I was using a switch case.
switch (int)
{
case 01: break;
case 02: break;.....
My problem arises at 08 and 09 because they are not octal. Is there
any way to coerce the input variable to decimal despite it having a
leading zero .
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |