HDTenEightyP/NetNews huggingface dataset:
From: meyer@darkwing.uoregon.edu (David M. Meyer 503/346-1747)
Newsgroups: comp.lang.perl
Subject: perl "patches" for solaris 2.0 ?
Date: 22 Jul 92 13:12:47 GMT
Article-I.D.: darkwing.MEYER.92Jul22061247
Distribution: comp
Organization: University Network Services, University of Oregon, Eugene, OR
	97403


	Does anyone know if perl for Solaris 2.0 (sparc) is in
	there works anywhere?


	Thanks,


	Dave


-------------------------------------------------------------------------------

	David M. Meyer			Voice:     503/346-1747
					Pager:	   503/342-9458
					FAX:	   503/346-4397
	Senior Network Engineer		Internet:  meyer@ns.uoregon.edu
	Office of University Computing	Bitnet:    meyer@oregon
  	University of Oregon		UUCP:	   ...!uoregon!meyer
	1225 Kincaid			
	Eugene, OR 97403	
Newsgroups: comp.lang.perl
From: rahard@eeserv.ee.umanitoba.ca (Budi Rahardjo)
Subject: [DOS] Perl386 update available
Summary: Update version of perl386
Keywords: DOS
Organization: Electrical Engineering, U of Manitoba, Winnipeg, Manitoba, Canada
Date: Thu, 30 Jul 1992 01:04:57 GMT

A newer version of perl for 386 [DOS], Hitoshi Doi <doi@jrd.dec.com> port, 
is available ftp.ee.umanitoba.ca as /pub/msdos/perl/perl386.zoo

-- budi rahardjo <rahard@ee.umanitoba.ca>

*** Here is the 'readme.386' file *** 

This is perl386 for MS-DOS systems built by using the DJGPP 1.05 compiler.
It will only run on systems with a 386 or greater.
This perl version is 4 patchlevel 35.

The files that needed modifications in order for the build to succeed were:

  makefile, config.h, perl.c, doio.c, toke.c
  msdos/makefile.386, msdos/msdos.c, msdos/popen.c

My modifications were done by doing #ifdef DJGPP.
I also used the following public pieces of code to add some pieces
missing in MS-DOS and DJGPP.

  glob (command line globbing), ufc (ultra fast crypt)

This kit contains all of the sources that needed modifications from the
original perl distribution, and the perl386.exe executable that has the
go32.exe (from DJGPP) prepended to it.

I have not run all of the tests and there are some features missing in
this perl.  You can look at the config.h file to see which features have
been commented out.  In addition, it does not have ioctl() and exec().
But this perl doesn't run out of memory like all of the other MS-DOS
versions of perl when running my large programs.

This perl will use a 387 for floating point.  But even if you don't have
one, you can use the 387 emulator provided by DJGPP.  You can set up the
environment as follows,

  set GO32=emu C:/gcc/emu387/emu387

where C:/gcc/emu387/emu387 is the path of the 387 emulator.  Without a
387 or a 387 emulator, most perl programs will not run.

Hitoshi Doi <doi@jrd.dec.com>, 1992.07.29

My environment is: Toshiba notebook computer (386SX-16MHz), 4MB memory,
40MB internal HD, 200MB external HD, MS-DOS v3.3 and Japanese MS-DOS v3.1.

--
Budi Rahardjo
<rahardj@ccu.umanitoba.ca>      <rahard@ee.umanitoba.ca> 
Electrical Engineering - University of Manitoba - Canada
From: newlin@purcell.ecn.purdue.edu (Johnny N.)
Newsgroups: comp.lang.perl
Subject: write
Date: 23 Jul 92 15:51:01 GMT
Organization: Purdue University Engineering Computer Network

Is there any way to make write send its output to a buffer instead
of a filehandle?  The only way that I could figure out to do this
is to send the output to a temporary file and then read it back in.
Needless to say, this is less than efficient.

-John
 newlin@ecn.purdue.edu
Newsgroups: comp.lang.perl
From: cole@concert.net (Derrick C. Cole)
Subject: Reading from named pipes
Organization: MCNC Data Operations
Date: Fri, 24 Jul 1992 14:01:48 GMT

Greetings!

I'm attempting to read a stream of records from syslogd through a named pipe.
I can do this ok in C, but really wan to use perl for reporting power.

Any and all help will be GREATLY appreciated!
Derrick

-- 
"Graduation from a four-year college or university, preferably with a major in
Physical Education, Recreation or Business and one year experience in the
operation of a Golf Pro Shop; thorough knowledge of the rules and regulations
of golf required."
From: Al Gaspar <gaspar@stepsun.army.mil>
Subject: Re: Perl on the Amiga ? 
Reply-To: gaspar@stepsun.army.mil
Organization: The Internet
Date: Tue, 28 Jul 1992 12:03:01 GMT


There is a very early version of perl available on Fred Fish disk #161.
However, it is VERY early--version 1.xx or 2.xx.  If I remember correctly,
an Amiga port is on Larry's wish list because he owns one too.

Cheers--

Al

-- 
Al Gaspar	<gaspar@st-louis-emh2.army.mil>
USAMC SIMA, ATTN:  AMXSI-TTC, 1222 Spruce St., St. Louis, MO  63103-2834
COMMERCIAL:  (314) 331-4354	AUTOVON:  555-4354
relay1.uu.net!st-louis-emh2.army.mil!gaspar
Newsgroups: comp.lang.perl
From: robt@is.morgan.com (Rob Torop)
Subject: usersub advice requested
Organization: Morgan Stanley & Company
Distribution: comp.lang.perl
Date: Fri, 31 Jul 1992 17:39:01 GMT

I've been home sick and have finally gotten around to trying to
understand usub and related mysteries. I've gotten pretty far, but the
following has been stumping me for two days now.  Any advice?  Once I
understand enough, I will write up an idiot proof tutorial on usersub
and post it.

Suppose I want to hook in a function to perl and call it like this:

    $s{'blah'} = 12;
    $s{'bleh'} = 13;
    ...
    $x = &myfn(*s, 100);

How do I pull the value associated with 'blah' out of st[1] in my
usersub?  I can't figure out how this works, but I'm betting that it's
just a simple function call to a hash table lookup function, passing
something like st[1]->str_u->str_hash and "blah". 

And should I pass back associative arrays just like regular arrays,
just interleaving the keys and values, eg ('andy', 1, 'opie', 2,
'floyd', 3)?

I know I could write myfn as a cover to another perl function that
takes a million parameters and call it like &myfun_aux($s{'blah'},
$s{'bleh'}, ...) but that's no fun at all.

--
-- Rob Torop

+---------------------------------------------------------------------+
| The views expressed here are neither mine nor those of my employer. |
+---------------------------------------------------------------------+
Newsgroups: comp.lang.perl
Subject: Re: two-way associate arrays
From: Tom Christiansen <tchrist@convex.COM>
Date: Wed, 29 Jul 1992 16:45:46 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Distribution: usa
Organization: CONVEX Realtime Development, Colorado Springs, CO
Originator: tchrist@pixel.convex.com
X-Disclaimer: This message was written by a user at CONVEX ComputerCorp. The 
 opinions expressed are those of the user andnot necessarily those of CONVEX.

From the keyboard of andy@homebase.vistachrome.com:
:I was wondering if there was a way to generate a 2-dimensional
:array in Perl.  For example:
:
:   news["fromsite"]["tosite"]++
:
:To track news traffic through.

Sure: $news{"fromsite", "tosite"} will probably work best, although with
*references, anything is possible to the relentlessly determined perl
programmer.

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist

    Though I'll admit readability suffers slightly... 
                    --Larry Wall in <2969@jato.Jpl.Nasa.Gov>
From: jepeway@cs.utk.edu (Chris Jepeway)
Newsgroups: comp.lang.perl
Subject: Re: Problems installing perl 4.035 on Sun
Date: 23 Jul 92 19:01:45 GMT
Organization: /silver/homes/jepeway/.organization
NNTP-Posting-Host: galoob.cs.utk.edu
In-reply-to: beaker@milton.u.washington.edu's message of 21 Jul 92 21:32:28 GMT

In article <1992Jul21.213228.3969@u.washington.edu> beaker@milton.u.washington.edu (Clint Olsen) writes:

>I am getting failures when running "make test" on our Sun Sparc2
>running SunOS 4.1.2.
>They are on regexp, eval, and cpp.  Worse than that, after lib/big
>I get a "Memory Fault (core dump)."
These are the same tests that crapped out on me and a few
others after compiling perl with gcc-2.2.2 on Sparcs.  There
seems to be some problem with <varargs.h>.  Any chance you
used GNU's CC?  I've been told that you can fix this either
by not using gcc or by editing config.sh so that i_varargs='undef'.

As an aside, has anybody had any luck reproducing the varargs problem
in a small piece of code so it can be submitted to gnu.gcc.bug?  I'm
trying to, but all the (simple) varargs code I've come up with on my
own works fine, and I'm not getting very far poking around in the perl
source.


>Clint Olsen 
>olsenc@maxwell.ee.washington.edu

Chris <jepeway@cs.utk.edu>
Newsgroups: comp.lang.perl
From: mcmahan@cs.unca.edu (Scott McMahan -- Genesis mailing list owner)
Subject: X thing to get string?
Organization: University of North Carolina at Asheville
X-Newsreader: Tin 1.1 PL3
Date: Wed, 22 Jul 1992 16:12:35 GMT

Is there an X program, preferably Motif-oriented (not that I'm that
picky :^)), that will pop a dialogue box, get a string from the user,
and print it on the stdout?

I need something like this for a program -- I'll open a 
pipe to capture its output -- so I can prompt for a hostname
to open an xterm window that rlogins to that host.
(ie pick Window to ... from the session manager, and this pops
up with a prompt like "Please type in hostname" and it reads that
and execs a window...)

If I knew anything at all about X programming, I'd write one myself,
but I don't and figure some hackers here probably already have one.

Scott
From: tchrist@convex.COM (Tom Christiansen)
Newsgroups: comp.lang.perl
Subject: Re: Print difference between 4.019 and 4.035
Date: 30 Jul 92 15:14:04 GMT
Article-I.D.: convex.1992Jul30.151404.10417
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: CONVEX Realtime Development, Colorado Springs, CO
Originator: tchrist@convex.convex.com
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of gaspar@stepsun.army.mil:
:	print '-' x 80."\n";
:
:Under 4.035 I got the following error messages:
:
:	syntax error in file /usr/local/bin/logpipe2.pl at line 26, next 2
:	  tokens "80."\n\n""
:
:I fixed the problem by changing the offending lines to:
:	print ('-' x 80)."\n";

Perl is being confused about whether you're talking about the
number "80." (as in 80.0) or the concat operator.  That's why

    1 + 80 . 1
and
    1+80.1

are very different.

--tom
-- 
"GUIs normally make it simple to accomplish simple actions and impossible
to accomplish complex actions."   --Doug Gwyn  (22/Jun/91 in comp.unix.wizards)

     Tom Christiansen           tchrist@convex.com      convex!tchrist
Newsgroups: comp.lang.perl
From: lemson@fnbc.com (David Lemson)
Subject: Re: Perl archive site?
Reply-To: lemson@fnbc.com
Organization: First National Bank Of Chicago, Chicago IL, USA
Distribution: na
Date: Wed, 22 Jul 92 14:01:33 GMT

In article <1992Jul21.183639.4213@mtu.edu> ddh@mtu.edu (DAVID HALE)  
writes:
>   Is there any ftp site that archives perl scripts?
> 
convex.com and ftp.uu.net (in /languages/perl).
--
David Lemson                                           (312) 732-4741
FNBC Sys Admin (Summer) UIUC NeXT Campus Consultant(rest of the time)
E-mail to: lemson@fnbc.com                          NeXTMail accepted
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: stat.pl query
Originator: tchrist@pixel.convex.com
Keywords: PERL
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: CONVEX Realtime Development, Colorado Springs, CO
Date: Tue, 28 Jul 1992 17:33:04 GMT
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of stuart@ds3100.new.dec.com (Stuart Broderick):
:Probably a stupid question, but....
:
:The following script is using stat.pl to determine the mode of a file
:using stat.pl. 
:
:#! /usr/local/bin/perl
:require 'stat.pl';
:do Stat('./test');
:print $st_mode,"\t",$st_uid,"\t",$st_gid,"\n";
:
:When this runs, I get 
:
:st_mode st_uid  st_gid
:33224   1103    100
:
:When I do a "ls -lag ./test",  I get
:
:-rwx--x---  1 stuart   espo       286720 Jul 28 17:56 ./test
:
:The username and group are correct (st_uid, st_gid), but what does
:st_mode relate to ? 
:I expected it to give 0710. 
:
:Can anyone tell me what I've done wrong ? I'm looking for a numeric
:representation of 
:the permissions field.

You should check the stat(2) man page.  mode contains both inode type and
permissions.  usually you &= 07777 to get just the permissions, which you
then may want to print out with a %04o printf mask.

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist
echo $package has manual pages available in source form.
echo "However, you don't have nroff, so they're probably useless to you."
    --Larry Wall in Configure from the perl distribution
Newsgroups: comp.lang.perl
From: flee@cs.psu.edu (Felix Lee)
Subject: Re: kosher?
	<1992Jul29.193125.19094@news.eng.convex.com>
Date: Wed, 29 Jul 1992 22:14:20 GMT

In comparison, REXX also has a form of "unquoted" strings, such that
	say hello world
is equivalent to
	say "HELLO" "WORLD"

This isn't really an unquoted string; it's more like an alternative to
'undef'.  In REXX, any symbol not assigned a value has its name as a
default value.  I seem to remember an IBM mainframe implementation of
Lisp that had similar behavior.

This doesn't work well for Perl, because Perl doesn't quite have
symbols.  Perl is rather committed to funny punctuation like '$foo'.
Inadvertently using 'foo' instead of '$foo' is a subtle typo that's a
little hard to find.

Tom Christiansen:
> The problem is that Larry might make blah or bleh reserved words.

In principle, this doesn't have to be a problem.  There aren't that
many words with syntactic significance, and most of them are only
meaningful in limited contexts.  You can also allow user definitions
to override keywords without much problem.  (But trying to make the
keyword use available in the same scope gets a little nasty.)
--
Newsgroups: comp.lang.perl
From: etxmesa@eos.ericsson.se (Michael Salmon)
Subject: Re: X thing to get string?
Reply-To: etxmesa@eos.ericsson.se (Michael Salmon)
Organization: Ericsson Telecom AB
Date: Thu, 23 Jul 1992 07:55:55 GMT

In article <1992Jul22.161235.18528@cs.unca.edu>, mcmahan@cs.unca.edu (Scott McMahan -- Genesis mailing list owner) writes:
|> Is there an X program, preferably Motif-oriented (not that I'm that
|> picky :^)), that will pop a dialogue box, get a string from the user,
|> and print it on the stdout?

This sounds very like xprompt:

Xprompt provides a means by which programs can ask the user
for one or more responses.  I have found it especially useful for
reducing the size of my (tv)twm menus.
Instead of hardwiring alternatives into a menu, a single script is used
to call xprompt and then invoke the appropriate thing.

For example, I have a twm menu item:

        "RLOGIN"        !"xprompt.rlogin &"

that invokes a shell script called xprompt.rlogin:

#! /bin/sh

defaulthost=${HOME}/.xprompt.rlogin
reply=

if [ -r $defaulthost ]
then
        reply=`cat $defaulthost`
fi

reply=`xprompt -p "Hostname" -r "$reply"`
if [ $? = 1 ]
then
        exit 0
fi
echo "$reply" > $defaulthost

xhost "$reply" > /dev/null 2>&1
xterm -T "rlogin $reply" -e rlogin "$reply" &

exit 0

The author is:

Barry Brachman           | {alberta,uw-beaver,uunet}!ubc-cs!brachman
Dept. of Computer Science| brachman@cs.ubc.ca (cs.ubc.ca=137.82.8.5)
Univ. of British Columbia| brachman@ubc.csnet
Vancouver, B.C. V6T 1Z2  | Office: (604) 822-3123, FAX: (604) 822-5485

-- 

Michael Salmon

#include	<standard.disclaimer>
#include	<witty.saying>
#include	<fancy.pseudo.graphics>

Ericsson Telecom AB
Stockholm
Newsgroups: comp.lang.perl
From: rantapaa@s6.math.umn.edu (Erik E. Rantapaa)
Subject: Re: Truncating or rounding "floats" and bug with ($_==int?2:3)
Organization: University of Minnesota
Date: Wed, 29 Jul 1992 04:38:45 GMT

nomi@pooh.mmwb.ucsf.edu (Nomi Harris) writes:

>This is probably a silly thing to even try to do in an untyped
>language, but I want to round off a "float" variable to an "int."
>Since there are no round() or truncate() functions, I wrote my
>own function:

Perl has int() which according to the man page returns the 'integer portion'
of an expression.  Unfortunately, neither the man page nor the Camel book
clarifies what this means.  From experimentation, it seems that int(x) returns
the floor of x if x >= 0 and ceiling of x for x < 0.  Given that, you can
use the following routines:

sub floor   { ($_)=@_; ( $_ < 0 ? ( $_==int($_) ? $_ : -int(-$_+1)) : int ); }
sub ceiling { ($_)=@_; ( $_ < 0 ? int : ( $_==int($_) ? $_ : -int(-$_-1)) ); }
sub closest { ($_)=@_; ( $_ < 0 ? int($_-0.5) : int($_+0.5) ); }

Note &closest(1.5) == 2 and &closest(-3.5) = -4 which may or may not
be what you want.

BTW, the following gives a syntax error (SunOS, patchlevel 19):

( $_==int ? 2 : 3)
--
        Erik Rantapaa                   rantapaa@math.umn.edu
 The use of COBOL cripples the mind; its teaching should, therefore, be
 regarded as a criminal offense.
 		-- E. W. Dijkstra
From: jepeway@cs.utk.edu (Chris Jepeway)
Newsgroups: comp.lang.perl
Subject: Perl 4.035, gcc-2.2.2, & SunOS-4.1.2 -- Solution
Date: 25 Jul 92 19:05:20 GMT
Organization: /silver/homes/jepeway/.organization
Distribution: world
NNTP-Posting-Host: tonka.cs.utk.edu

OK, so the problem with perl & gcc & SunOS is,
simply, bogus header files.  Configure wants to
set up the default compiler flags to contain
"-I/usr/ucbinclude".  If you do this, gcc will
get <varargs.h> from /usr/ucbinclude instead
of using its own version.  Since gcc's idea
of varargs differs from SunOS's idea of Berkeley's
idea of varargs, the perl executable ends up
dereferencing invalid pointers.

The fix is to leave out the "-I/usr/ucbinclude" when
Configure asks you about which flags the C compiler needs.
I've done this, built perl, and successfully run all
the tests in the t/ directory.  Oh, wait, there'll be
some warning from cccp about an "unterminated string constant"
during the cpp test.  Just ignore it, GNU's C-preprocessor
is being anal about an apostrophe in a perl comment.

Could later versions of Configure be changed so that
/usr/ucbinclude is ignored when using gcc?

Chris <jepeway@cs.utk.edu>
Newsgroups: comp.lang.perl
From: brendan@eff.org (Brendan Kehoe)
Subject: Empty IF-TRUE-EXPR in ?:
Reply-To: brendan@eff.org
Organization: The Electronic Frontier Foundation
Distribution: usa
Date: Wed, 22 Jul 1992 02:19:56 GMT


I was thinking, it'd be nice to be able to have

	$foo ? $foo : 4;

be also available as

	$foo ? : 4;

to avoid re-parsing the second case of $foo.  (Where $foo could be any
arbitrarily large expression.)

--
Brendan Kehoe                          brendan@eff.org / brendan@cs.widener.edu
                        Please send CuD Archive submissions to cudarch@eff.org.
Newsgroups: comp.lang.perl
From: robt@is.morgan.com (Rob Torop)
Subject: kosher?
Organization: Morgan Stanley & Company
Distribution: comp.lang.perl
Date: Wed, 29 Jul 1992 18:42:30 GMT

I recently discovered that rather than using

    $a{'blah'} = 'bleh';

I can get away with

    $a{blah} = 'bleh';

i.e. it seems to have exactly the same effect.  Is there any reason I
shouldn't do this?

-- Rob Torop

+---------------------------------------------------------------------+
| The views expressed here are neither mine nor those of my employer. |
+---------------------------------------------------------------------+

--
-- Rob Torop

+---------------------------------------------------------------------+
| The views expressed here are neither mine nor those of my employer. |
+---------------------------------------------------------------------+
Newsgroups: comp.lang.perl
From: ball@msdrl.com (Richard Ball)
Subject: too slowwww.....
Organization: Merck Research Laboratories
Date: Tue, 28 Jul 92 13:00:15 GMT

(My apologies if this is a repost (someone please let me know if it is) but
 news was a liile flakey and I'm not sure if this got out. The following is
 the gist of my question)

After learning a little perl I thought I would apply it to a task I had in
reformatting a postscript file. My filter, not surprisingly I guess, runs very
slowly and since there are a few here with interests in speed and scalability I
would like to solicit suggestions for improvement. I am mchanging a file from
       this                                     to this
 5.939 u  6.001 u mt                         427.6 432.1 m
 4.002 u  3.221 u lt                         288.1 231.9 l
[ with lots more lt type lines]              [etc]
s                                            S
 7.845 u 1.669 u mt                          564.8 120.2 m
[etc., etc.]                                 [etc., etc.]

file size is about 9 or 10 K lines. 

The guts of my script are:
while (<STDIN>){
  if (/^s/) {print "S\n"; next;}
  tr/u//d;
  ($x, $y, $mode) = split(' ');
  chop($mode);
  $x = $x * 72;
  $y = $y * 72;
  printf "%6.1f %6.1f $s\n", $x, $y, $mode;
}

But this takes almost a minute on an 8K line file! From some testing its clear
the split and the printf are the worst time hogs. I want the effects of the
printf though so I only get 1 decimal place on the output. 
Anyone got any tricks that will get the time down?

R.G. Ball                    |  phone: 908-594-5341
Merck Research Laboratories  |  FAX:   908-594-6645
PO Box 2000, MD:RY80N-18A    |  email: ball@msdrl.com
Rahway, NJ 07065  USA        |    or   ...!uunet!msdrl!ball
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: or puzzlement
Date: 24 Jul 92 19:21:37 GMT
Organization: NetLabs, Inc.

In article <Brut2B.80J@unx.sas.com> kent@manzi.unx.sas.com (Paul Kent) writes:
: perhaps "next" is not as executable as "return". 

It's just as executable, and just as embeddable within an expression.
What it isn't just as, is capable of evaluating an expression argument.

[How's that for anomalous but useful syntax?  How 'bout let's do it right
and revise English, say, next Friday?  Good, I'll be there.]

: here are some attempts..
: [...]
: print STDERR "\n\n and now for loopy tricks\n\n";
: for $d ($d1,$d2)
: {
:     opendir(D, $d) || warn "loop_or: no $d" || next;
:     print STDERR "loop_or: $d must exist cuz we got this far\n"; 
: }

Again, these are failing because (without parens) warn is a list operator,
and a list operator eats everything to its right that is of the same
precedence as comma or higher.  Which is the same as saying it eats
everything, since comma is the lowest precedence.

Larry
Xref: sparky comp.lang.perl:5040 comp.unix.programmer:4019 comp.unix.shell:3210
From: buzz@toxicavenger.bear.com (Buzz Moschetti)
Newsgroups: comp.lang.perl,comp.unix.programmer,comp.unix.shell
Subject: A Tool Challenge...which lang is best?
Date: 30 Jul 92 16:33:06 GMT
Reply-To: buzz@fsrg.bear.com
Distribution: comp
Organization: Bear, Stearns & Co. Inc.

I need a tool that returns a context-dependent value string given an input key.
Below is a sample of the resource DB that is evaluated by this tool:

#
#  Comment!
#
MRX.MACHINE		node1 \
			dev!node2 \
			test!node3

MRX.ROOTDIR		/tmp dev!/usr/tmp

MRX.NAME		user1 \
			dev!"two names"

MRX.DB			$MRX.MACHINE:$MRX.ROOTDIR/the_db $MRX.NAME\
			dev!$MRX.MACHINE:$MRX.ROOTDIR/other_db $MRX.NAME

Assuming the tool is called xxx, here are sample of the expected output:
	$ xxx MRX.MACHINE
	node1
	$ xxx -domain test MRX.MACHINE
	node3
	$ xxx MRX.DB
	node1:/tmp/the_db user1
	$ xxx -domain dev MRX.DB
	node2:/usr/tmp/other_db "two names"
	$ xxx MRX
	MACHINE node1
	ROOTDIR /tmp
	NAME uesr1
	DB node1:/tmp/the_db
	$

Notes:
1.  \ will escape the CR.
2.  The input key is always of the form "object.attribute."
3.  Fetching just the object returns all attributes and their values, one pair
    to each line, separated by a space.

I can implement this tool using C, but I'd prefer not to if I can do it 
using sh(1) and Un*x tools or perl, especially since the basic task of this
tool seems to be variable interpolation.

Any suggestions?
Newsgroups: comp.lang.perl