[12631] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 40 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 7 04:17:23 1999

Date: Wed, 7 Jul 1999 01:07:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 7 Jul 1999     Volume: 9 Number: 40

Today's topics:
    Re: Order of Output <walton@frontiernet.net>
    Re: Order of Output (Ken)
    Re: Order of Output <gellyfish@gellyfish.com>
    Re: Order of Output (Tad McClellan)
    Re: Order of Output (Ken)
    Re: Order of Output (Abigail)
    Re: Order of Output <gellyfish@gellyfish.com>
    Re: Order of Output (Ken)
    Re: Order of Output <gellyfish@gellyfish.com>
        Passing an uploaded file to js string variable <webmaster@webmagic.n.se>
    Re: Passing an uploaded file to js string variable <hiller@email.com>
    Re: passing Perl hash to javascript <gellyfish@gellyfish.com>
    Re: passing Perl hash to javascript (I.J. Garlick)
        pattern matching in ssi <paul@esn-maastricht.nl>
    Re: pattern matching in ssi (Anno Siegel)
    Re: pattern matching in ssi (elephant)
    Re: Perl and Borland C++ Builder 4 on Win98 <dchristensen@california.com>
        Perl and Forth interoperability? <vinger@mail.ford.com>
        perl date <technology@workmail.com>
    Re: perl date (Abigail)
    Re: perl debugger commands from a file (Ronald J Kimball)
    Re: perl debugger commands from a file (Ilya Zakharevich)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Fri, 02 Jul 1999 21:40:35 -0400
From: Bob Walton <walton@frontiernet.net>
To: kloomis@it-resourcesNOSPAM.com
Subject: Re: Order of Output
Message-Id: <377D6A13.9F718137@frontiernet.net>



Ken wrote:

> I found the following info in the FAQ.  Could someone be so kind as to
> explain how to use this?  Assume I know nothing.
>
> >Q4.12: Why doesn't my system () output come out in the right order?
> >This has to do with the way the standard output is buffered. In order for the output to display in the correct order, you need to turn buffering off by using the $| variable:
>
> >$| = 1;
>

 ...
Ken, when Perl outputs stuff using its default settings, the output is "buffered".  This means that a chunk of output (like maybe several thousand characters of it) are stored in
memory, and then, when the buffer is almost full (or the system feels like it or something), the contents of the buffer are written to the actual output device.  This greatly
improves performance, as most output activity becomes just copying things around in memory.  But in some cases, this presents a problem, such as if you are writing into a pipe
connected to another program (as with the Perl statements

open PROG,"|myprog" or die "Oops, $!\n";
print PROG "some stuff\n";
close PROG;

for example).  The standard output of myprog is supposed to mingle with the standard output of your Perl program.  But because Perl's standard output is by default buffered, the
output of the piped-to program will probably come out before some of the output that Perl has already written to its standard output (because that chunk of output is still in the
memory buffer, and hasn't actually been physically written out yet -- and myprog will have its own output buffer for its STDOUT).  To get around this, the Perl built-in variable
$| may be set non-zero.  When it is non-zero, the currently-selected filehandle (STDOUT is the default) is set to not buffer, or, in other words, autoflush.  This means all the
output up to the above open statement would have been physically written to STDOUT prior to execution of the open, so the standard output of myprog would appear in the anticipated
place.  But be aware that non-buffered output is much less efficient, since a complete I/O cycle has to occur each time an output statement is executed.

See perlvar for more info; also select and open in perlfunc.



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

Date: Sat, 03 Jul 1999 04:58:47 GMT
From: kloomis@it-resourcesNOSPAM.com (Ken)
Subject: Re: Order of Output
Message-Id: <377d96fe.54404155@news.tiac.net>

Bob Walton <walton@frontiernet.net> wrote:


>...
>Ken, when Perl outputs stuff using its default settings, the output is "buffered".  This means that a chunk of output (like maybe several thousand characters of it) are stored in
>memory, and then, when the buffer is almost full (or the system feels like it or something), the contents of the buffer are written to the actual output device.  

Bob, You've gone pretty far over my head here.  Maybe if I narrow this
down a bit, you can provide a more specific answer.  I get data from a
form on a web page.  The inputs are arranged in a table.  The Perl
script then puts a subject and addressee in an e-mail and prints the
data in the body of the mail, except the order that the data is put in
the email is not the same as it was gathered in, so I get Middle
initial, street, firstname, city, phone, lastname as opposed to the
normal order.

I tried sticking $|=1 in various places, but the faqs I read don;t
explain exactly how to use it, and I'm not sure that it addresses the
problem I'm having.

Thanks


Ken Loomis
IT Resources
Lexington, MA
www.it-resources.com


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

Date: 3 Jul 1999 10:04:28 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Order of Output
Message-Id: <7lkn7c$2p3$1@gellyfish.btinternet.com>

On Sat, 03 Jul 1999 04:58:47 GMT Ken wrote:
> Bob Walton <walton@frontiernet.net> wrote:
>>Ken, when Perl outputs stuff using its default settings, the output is "buffered".  This means that a chunk of output (like maybe several thousand characters of it) are stored in
>>memory, and then, when the buffer is almost full (or the system feels like it or something), the contents of the buffer are written to the actual output device.  
> 
> Bob, You've gone pretty far over my head here.  Maybe if I narrow this
> down a bit, you can provide a more specific answer.  I get data from a
> form on a web page.  The inputs are arranged in a table.  The Perl
> script then puts a subject and addressee in an e-mail and prints the
> data in the body of the mail, except the order that the data is put in
> the email is not the same as it was gathered in, so I get Middle
> initial, street, firstname, city, phone, lastname as opposed to the
> normal order.
> 
> I tried sticking $|=1 in various places, but the faqs I read don;t
> explain exactly how to use it, and I'm not sure that it addresses the
> problem I'm having.
> 

Ah.  If you are only doing what you say then this has nothing to do with
$| but with one (or perhaps both ) of :

    *  The order that you are getting your data from the browser

    *  The fact that you are taking the data from a hash which is
       effectively unordered.

You might want to show us the smallest snippet of code that would 
demonstrate what you are trying to do.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Sat, 3 Jul 1999 06:06:16 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Order of Output
Message-Id: <oankl7.m84.ln@magna.metronet.com>

Bob Walton (walton@frontiernet.net) wrote:

: the Perl built-in variable
: $| may be set non-zero.  When it is non-zero, the currently-selected filehandle (STDOUT is the default) is set to not buffer, or, in other words, autoflush.  


   Your "other words" to not mean the same thing, though the *effect*
   is the same.

   With autoflush enabled, it is _still_ buffered, but the buffer
   gets flushed more often.

   Setting $| to true enables autoflush.

   Setting $| to true does not disable buffering.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Sun, 04 Jul 1999 04:49:46 GMT
From: kloomis@it-resourcesNOSPAM.com (Ken)
Subject: Re: Order of Output
Message-Id: <377ee765.17501804@news.tiac.net>

Jonathan Stowe <gellyfish@gellyfish.com> wrote:

>> 
>
>Ah.  If you are only doing what you say then this has nothing to do with
>$| but with one (or perhaps both ) of :
>
>    *  The order that you are getting your data from the browser
>
>    *  The fact that you are taking the data from a hash which is
>       effectively unordered.
>
>You might want to show us the smallest snippet of code that would 
>demonstrate what you are trying to do.
>
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
    ($name, $value) = split(/=/, $pair);
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    $FORM{$name} = $value;
}
$mailprog = '/usr/sbin/sendmail';
$recipient = 'me@myaddress.com';
open (MAIL, "|$mailprog -t") or &dienice("Can't access $mailprog!\n");
print MAIL "To: $recipient\n";
print MAIL "Subject: Form Data\n";
print MAIL "From: $Form{'FirstName'} $FORM{LastName}\n";
print MAIL "Reply to: $Form{'Email'}\n\n";

foreach $pair (@pairs) {
print MAIL "$name = $FORM{$name}\n";
}


The resulting e-mail has the headers filled out correctly, but the
order of the data in the body of the message is not in the order it
was inputted in the form.

Ken

Ken Loomis
IT Resources
Lexington, MA
www.it-resources.com


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

Date: 4 Jul 1999 00:28:21 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Order of Output
Message-Id: <slrn7nts72.31h.abigail@alexandra.delanet.com>

Ken (kloomis@it-resourcesNOSPAM.com) wrote on MMCXXXIII September
MCMXCIII in <URL:news:377ee765.17501804@news.tiac.net>:
!! 
!! foreach $pair (@pairs) {
!! print MAIL "$name = $FORM{$name}\n";
!! }
!! 
!! The resulting e-mail has the headers filled out correctly, but the
!! order of the data in the body of the message is not in the order it
!! was inputted in the form.

That's trivial to explain. You loop over @pairs, but you never 
use the iteration variable in the body.


\begin{off-topic}
What you want is impossible. And entirely pointless. Who cares in which
order a user fills in the form? Why do you want to know whether they
filled it in top to bottom, or bottom to top? Who cares?

It might be that you mean "in the same order as the elements appear in
the form". That's easy. You created the form, so you know the order. But
the browser can send back the values of the form elements in any order
it pleases.  As explained in the specification. In fact, in some cases
it may not mention that form element in its reply at all!
\end{off-topic}



Abigail
-- 
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
         ${qq$\x5F$} = q 97265646f9 and s g..g;
         qq e\x63\x68\x72\x20\x30\x78$&eggee;
         {eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 4 Jul 1999 12:31:11 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Order of Output
Message-Id: <7lnk6f$3p4$1@gellyfish.btinternet.com>

On Sun, 04 Jul 1999 04:49:46 GMT Ken wrote:
> Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> 
>>You might want to show us the smallest snippet of code that would 
>>demonstrate what you are trying to do.
>>
> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
> @pairs = split(/&/, $buffer);
> foreach $pair (@pairs) {
>     ($name, $value) = split(/=/, $pair);
>     $value =~ tr/+/ /;
>     $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
>     $FORM{$name} = $value;
> }

You really want to be using a well documented module such as CGI.pm to do
that - specifically you are not checking whether you are getting the amount
of data you ask for back from the read(), you are not dealing with a
request method other than POST, you are not dealing with the case where
a parameter might have more than one value ...


<snip>

> 
> foreach $pair (@pairs) {
> print MAIL "$name = $FORM{$name}\n";
> }
> 

If this is the actual code that you are using then I would be surprised if it
did anything other than print out the last parameter received from the
browser the number of times that there are parameters.

I think you would be wanting to do something like:

foreach $key (keys %FORM)
   {
     print MAIL "$key = $FORM{$key}\n";
   }

Of course this does not address your ordering concerns as discussed in the
perlfunc entry for 'keys '.

If you want to retain the order which the parameters are passed to your
program (note that I am careful not to say anything about the order
which the parameters appear in the browser) you will need to store
the keys to your hash in a separate array - you could put something
like this in the loop in your parsing routine:

  push @names, $name;

Then change the loop that prints out the parameters to something like:

  foreach $name (@keys)
    {
     print MAIL "$name = $FORM{$name}\n";
    }

Of course if you were using CGI.pm then you could rely on the order of
the parameters returned by the param() method:

       NOTE: As of version 1.5, the array of parameter names
       returned will be in the same order as they were submitted
       by the browser.  Usually this order is the same as the
       order in which the parameters are defined in the form
       (however, this isn't part of the spec, and so isn't
       guaranteed).

   
Thus you could do:

   foreach $name (param())
     {
       print MAIL param($name),"\n";
     }

Go on use CGI.pm - you know it makes sense.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Mon, 05 Jul 1999 14:56:25 GMT
From: kloomis@it-resourcesNOSPAM.com (Ken)
Subject: Re: Order of Output
Message-Id: <3780c647.505370@news.tiac.net>

Jonathan Stowe <gellyfish@gellyfish.com> wrote:

>>     $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
>>     $FORM{$name} = $value;
>> }
>
>You really want to be using a well documented module such as CGI.pm to do
>that - specifically you are not checking whether you are getting the amount
>of data you ask for back from the read(), you are not dealing with a
>request method other than POST, you are not dealing with the case where
>a parameter might have more than one value ...
>

I do check to see if required info was submitted, but if I understand
you correctly there is some pre-written piece of code that I can use
to do this, and it's documented as well?  A while back I did browes
thru what looked like a list of modules but couldn;t make head nor
tail of them.  Can you tell me how to access them or point me to some
directions.
><snip>
>
>I think you would be wanting to do something like:
>
>foreach $key (keys %FORM)
>   {
>     print MAIL "$key = $FORM{$key}\n";
>   }
>
>Of course this does not address your ordering concerns as discussed in the
>perlfunc entry for 'keys '.
>
Yes, I did try that, but no, it didn't solve the ordering problem.

>If you want to retain the order which the parameters are passed to your
>program (note that I am careful not to say anything about the order
>which the parameters appear in the browser) you will need to store
>the keys to your hash in a separate array - you could put something
>like this in the loop in your parsing routine:
>
>  push @names, $name;
>
>Then change the loop that prints out the parameters to something like:
>
>  foreach $name (@keys)
>    {
>     print MAIL "$name = $FORM{$name}\n";
>    }
>
>Of course if you were using CGI.pm then you could rely on the order of
>the parameters returned by the param() method:
>
>       NOTE: As of version 1.5, the array of parameter names
>       returned will be in the same order as they were submitted
>       by the browser.  Usually this order is the same as the
>       order in which the parameters are defined in the form
>       (however, this isn't part of the spec, and so isn't
>       guaranteed).
>
>   
>Thus you could do:
>
>   foreach $name (param())
>     {
>       print MAIL param($name),"\n";
>     }
>
>Go on use CGI.pm - you know it makes sense.
>
I'd be glad to.  How do I get there?

Ken
Ken Loomis
IT Resources
Lexington, MA
www.it-resources.com


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

Date: 5 Jul 1999 16:22:32 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Order of Output
Message-Id: <3780cdb8@newsread3.dircon.co.uk>

Ken <kloomis@it-resourcesNOSPAM.com> wrote:
> Jonathan Stowe <gellyfish@gellyfish.com> wrote:
>
>>Go on use CGI.pm - you know it makes sense.
>>
> I'd be glad to.  How do I get there?
> 

The documentation for CGI.pm is at <http://stein.cshl.org/WWW/CGI/>
however if you are using a relatively recent Perl then the module should
be installed already as it is part of the standard distribution.

/J\
-- 
"The internet is like a car boot sale" - Jon Sopel, BBC News


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

Date: Sat, 03 Jul 1999 22:11:01 +0200
From: WebMaster <webmaster@webmagic.n.se>
Subject: Passing an uploaded file to js string variable
Message-Id: <377E6E54.5B59E763@webmagic.n.se>

I´m trying to find out  how to get the uploaded file from a form to be
passed to a JavaScript by a call to JavaScript function with the
uploaded file as a string variable for further processing.

Anyone than can help me out?

Thanks

Per



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

Date: Sat, 03 Jul 1999 20:16:24 GMT
From: Jordan Hiller <hiller@email.com>
Subject: Re: Passing an uploaded file to js string variable
Message-Id: <377E6FDE.A8F19E6A@email.com>

You can't "call a JavaScript function" from Perl like you can from
Java<-->JavaScript, but what you can do is print out JavaScript code from the
perl program. For example:

#!/usr/bin/perl
$uploadedfile = get("file"); # this variable will become Javascript later

print <<JSCODE;
<SCRIPT LANGUAGE="JavaScript">
<!--
var uploadedfile = "$uploadedfile";
//-->
</SCRIPT>
JSCODE
exit;

The problem with this is that you might end up with JavaScript code that looks
like something like this, which is invalid:
var uploadedfile = "file line 1
file line 2
"next line"";

You'll get errors from improper quotes and newlines.

To fix this, put something like these after $uploadedfile is defined:
$uploadedfile =~ s/\r?\n/\\n/g; # Fix newlines
$uploadedfile =~ s/\"/\\\"/g; # Fix double quotes

Now you should have better JavaScript output:
var uploadedfile = "file line 1\nfile line 2\n\"next line\"";

You might want to call this perl script from SSI if your HTML page is not
Perl-generated.

Jordan

WebMaster wrote:
> 
> I´m trying to find out  how to get the uploaded file from a form to be
> passed to a JavaScript by a call to JavaScript function with the
> uploaded file as a string variable for further processing.
> 
> Anyone than can help me out?
> 
> Thanks
> 
> Per

-- 
Jordan Hiller (hiller@email.com)

JavaScript and Perl programs for
 making online tests and quizzes:
http://web-shack.hypermart.net/quiz.html


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

Date: 3 Jul 1999 10:12:20 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: passing Perl hash to javascript
Message-Id: <7lknm4$2p6$1@gellyfish.btinternet.com>

On Fri, 02 Jul 1999 19:41:19 -0400 Carrie Coy wrote:
> David Cassell wrote:
> 
>> Carrie Coy wrote:
>> >
>> > Within a perl CGI.pm script I've generated a perl hash. How can I get
>> > the contents of that hash into a two dimensional javascript array so I
>> > can validate against it?
>>
>> Umm, I must be missing something here.  Won't it be a *lot*
>> easier to validate 'against' the hash in Perl, using the functions
>> Perl has for working with hashes?  This doesn't look to me
>> like a good application for JavaScript.  Look up these Perl
>> functions and see if they'll cover what you need:
>>
> 
> Yes, it would be a snap in Perl but I want to do the validations before the
> form is submitted.
> The user is editting a list of employee numbers and the javascript function
> would lookup and return job titles on the fly.
> 
> I can do this easily after the form is submitted but I thought it would be
> slicker to do it interactively.
> 
> That said, can it be done?
> 

If your program is generating the form that will contain the Javascript
validation routines then you could have it generate the relevant Javascript
code that will initialize the appropriate array with the contents of your
hash. Of course what that generated javascript will look like is a question
for another group : comp.lang.javascript.

If your script is not generating the form then no you cant do it.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


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

Date: Mon, 5 Jul 1999 11:07:39 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: Re: passing Perl hash to javascript
Message-Id: <FEE9Ks.9Bz@csc.liv.ac.uk>

In article <377D4E1E.95791604@doc.state.vt.us>,
Carrie Coy <carriec@doc.state.vt.us> writes:
> Yes, it would be a snap in Perl but I want to do the validations before the
> form is submitted.
> The user is editting a list of employee numbers and the javascript function
> would lookup and return job titles on the fly.
> 
> I can do this easily after the form is submitted but I thought it would be
> slicker to do it interactively.
> 
> That said, can it be done?

Why bother? You still have to do it in perl once it's submitted anyway, as
the user can just turn that annoying javascript off and you are back to
square one with unvalidated data.

Still if you must just output the correct javascript. You will need to
goto another group for that though.

-- 
Ian J. Garlick
ijg@csc.liv.ac.uk

As long as the answer is right, who cares if the question is wrong?



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

Date: Sun, 04 Jul 1999 22:01:05 +0200
From: Paul Cauberg <paul@esn-maastricht.nl>
Subject: pattern matching in ssi
Message-Id: <377FBD80.E8F082C@esn-maastricht.nl>

Hi,

I was wondering how I could match a pattern in ssi, from my perl book
I got that I could use /dial.tue.nl\b\i   if i want the pattern to end
with dial.tue.nl regardless of the case. When i use this in an ssi-call
I get an error. (/dial.tue.nl/ does work but then I get to many
positives, i only want machtes for strings that finish with the
pattern).

What I tried is:

<!--#if expr="${REMOTE_HOST} = /dial.tue.nl\b/i" -->
<meta http-equiv="Refresh" content="0;
URL=http://www.regio-buttons.com/es/">

Thanks
Paul Cauberg (paul@limburgers.nu)




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

Date: 4 Jul 1999 21:18:26 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: pattern matching in ssi
Message-Id: <7loj32$l73$1@lublin.zrz.tu-berlin.de>

[newsgroups trimmed to clpm]

Paul Cauberg  <paul@esn-maastricht.nl> wrote in comp.lang.perl.misc:
>Hi,
>
>I was wondering how I could match a pattern in ssi, from my perl book
>I got that I could use /dial.tue.nl\b\i   if i want the pattern to end

Wrong kind of slash.  The pattern you mean is most likely 
/dial\.tue\.nl\b/i (note backslashes before the dots).  This would
match any string "dial.tue.nl" that ends at a word boundary.
If you want matches only at the end of the string, use /dial\.tue\.nl$/i.

[rest snipped]

Anno


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

Date: Mon, 5 Jul 1999 09:29:48 +1000
From: e-lephant@b-igpond.com (elephant)
Subject: Re: pattern matching in ssi
Message-Id: <MPG.11ea997748599a9c989ade@news-server>

Paul Cauberg writes ..
>What I tried is:
>
><!--#if expr="${REMOTE_HOST} = /dial.tue.nl\b/i" -->
><meta http-equiv="Refresh" content="0;
>URL=http://www.regio-buttons.com/es/">

Paul .. assuming that you're talking about bulk standard Apache SSI 
syntax here in a server-parsed HTML file .. then comp.lang.perl.misc is 
the wrong newsgroup .. as is your "perl book"

the language that Apache interprets in these <!--#command --> tags is not 
Perl .. it's Apache's own SSI language .. and you will need to source 
help from your Apache documentation

just quietly - I don't think that there's any ability within the Apache 
syntax for regular expression comparisons

-- 
 jason - remove all hyphens for email reply -


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

Date: Tue, 6 Jul 1999 12:11:34 -0700
From: "David Christensen" <dchristensen@california.com>
Subject: Re: Perl and Borland C++ Builder 4 on Win98
Message-Id: <37825ae9@news5.newsfeeds.com>

"Alan Bellingham" <alanb@episys.com> wrote:
>"David Christensen" <dchristensen@california.com> wrote:
>
>>Hello, World!
>>
>>Has anyone tried compiling Perl with Borland C++ Builder 4 on a
>>Win98 box?
>
>Not yet.
>
>I have compiled Perl using C++ Builder 3 on an NT 4 box.
>
>The code in question _should_ build under C++ Builder 4 (I'm still
using
>3 for existing code, though).
>
>It's mostly doing very slight modifications to the build file
based on
>the Borland C++ 5 settings - one object file is in a different
place,
>since Builder is entirely 32-bit, so doesn't have a separate 16
and 32
>bit variant of the file in question.
>
>(And I'm at home, so I can't remember right now what I did.)

Kewl.  I thought it could be done.  :-)

>>How about embedding Perl in a Builder application, or vice-versa?
>
>Yes.
>
>One special thing about that - just before the include files for
perl,
>#undef PACKAGE.

OK  I'll remember that tip.

>>If it hasn't been done yet, I would be very willing to help with
>>the effort.  Is there someone knowledgeable who would be willing
to
>>lead?
>
>I _must_ document what I've done.

Yes, please.  :-)

>I'm still waiting for the large shipment of round tuits, though.

round tuits (?)

--
David
dchristensen@california.com

borland.public.cppbuilder.language
comp.lang.perl.misc





  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Thu, 01 Jul 1999 16:23:30 -0400
From: Slav Inger <vinger@mail.ford.com>
Subject: Perl and Forth interoperability?
Message-Id: <377BCE42.579F7948@mail.ford.com>

Hello,

Are there any Perl modules out there that allow for interoperability
between Perl and Forth, especially in the area of industrial automation
control and closed-loop monitoring (possibly real-time)?  I looked over
CPAN, but couldn't find anything...  Are there any [commercial] Perl
real-time ports that anyone is aware of?

Thanks.

- Slav Inger.
- vinger@mail.ford.com


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

Date: Sun, 04 Jul 1999 22:14:32 -0700
From: Raj <technology@workmail.com>
Subject: perl date
Message-Id: <37803F38.35B62267@workmail.com>

Hi,
Given a Date range passed from the CGI/Perl script, how do we retrieve a
set of rows/records from a text file (of format say..
01Jan1999:col2:col3) that matches the date range.??? TIA,
Raj



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

Date: 5 Jul 1999 03:49:20 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: perl date
Message-Id: <slrn7o0sbt.h6v.abigail@alexandra.delanet.com>

Raj (technology@workmail.com) wrote on MMCXXXIV September MCMXCIII in
<URL:news:37803F38.35B62267@workmail.com>:
&& Hi,
&& Given a Date range passed from the CGI/Perl script, how do we retrieve a
&& set of rows/records from a text file (of format say..
&& 01Jan1999:col2:col3) that matches the date range.??? TIA,


Open the file, read it line by line, remember it when it matches the
date range.



Abigail
-- 
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Mon, 5 Jul 1999 21:20:13 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: perl debugger commands from a file
Message-Id: <1duhj9d.1hwbp4moe1nmeN@p21.block2.tc2.state.ma.tiac.com>

Badari Kakumani <badari@cisco.com> wrote:

> Even the aliases I create in the ~/.perldb file are NOT working. The
> alias
>     $DB::alias{pc} = 'print "alias for pc\n";';
> defined in ~/.perldb works; but the alias
>     $DB::alias{pas} = c_debug::c_print_assoc;
> does NOT. Any idea why the above alias does NOT work?

I notice that you didn't quote the RHS, as shown in the documentation
and in your first example.

-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 6 Jul 1999 07:14:04 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: perl debugger commands from a file
Message-Id: <7lsabs$9ah$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Ronald J Kimball
<rjk@linguist.dartmouth.edu>],
who wrote in article <1duhj9d.1hwbp4moe1nmeN@p21.block2.tc2.state.ma.tiac.com>:
> Badari Kakumani <badari@cisco.com> wrote:
> 
> > Even the aliases I create in the ~/.perldb file are NOT working. The
> > alias
> >     $DB::alias{pc} = 'print "alias for pc\n";';
> > defined in ~/.perldb works; but the alias
> >     $DB::alias{pas} = c_debug::c_print_assoc;
> > does NOT. Any idea why the above alias does NOT work?
> 
> I notice that you didn't quote the RHS, as shown in the documentation
> and in your first example.

One of the problems with doing thing in .perldbrc is that it is run
when *no piece* of the program is compiled yet.  However, one may
mock TTY input to debugger by stuffing things into @DB::typeahead.

Say, one may put arbitrary "post-compilation" code into a subroutine
and put the name of this subroutine into typeahead (then optionally
put 'c' there too).

Ilya


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

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 40
************************************


home help back first fref pref prev next nref lref last post