[13182] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 592 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 19 17:07:14 1999

Date: Thu, 19 Aug 1999 14:05:16 -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           Thu, 19 Aug 1999     Volume: 9 Number: 592

Today's topics:
    Re: %0 %1 %2 ???? <cassell@mail.cor.epa.gov>
        Attn: CRAP (was Re: voting system pealse advise) <uri@sysarch.com>
        directory reading <heather.wiley.fake@bentley.com>
    Re: Dynamic File Handles <aperrin@mcmahon.qal.berkeley.edu>
    Re: FontMonkey <cassell@mail.cor.epa.gov>
        GDBM Access in Perl <jimt@netins.net>
    Re: HARASSMENT -- Monthly Autoemail; Spammer Defiant <urielw@tiac.net>
        How to remove an element from a multidimensional hash?? <kuchida@slt.sel.sony.com>
    Re: How to remove an element from a multidimensional ha <makkulka@cisco.com>
    Re: Newbie need help AKA Newbie's done <jyoyoliu@hotmail.com>
    Re: Newbie need help psdsp@my-deja.com
    Re: Newbie need help <jyoyoliu@hotmail.com>
    Re: OOP in perl - not modules!!! (Mark-Jason Dominus)
    Re: OOP in perl - not modules!!! (Larry Rosler)
    Re: Perl compiler for DOS/Windows? (Bart Lateur)
    Re: Perl compiler for DOS/Windows? <cassell@mail.cor.epa.gov>
        Perl Exam Beta Testers Required <scollins@co-active.com>
        Perl regex matching problem (in a Java env) <spammers_suck@[127.0.0.1]>
    Re: perl-DBI problem (Dan Wilga)
    Re: Q: How to get file contents from client <makkulka@cisco.com>
    Re: Q:Two perl programs printing to one txt file <emschwar@rmi.net>
    Re: Q:Two perl programs printing to one txt file (Larry Rosler)
        Referring to "my" variables ("willow")
    Re: Referring to "my" variables <makkulka@cisco.com>
    Re: Referring to "my" variables <emschwar@rmi.net>
    Re: Running a perl process as service under Win NT (Ben Coleman)
    Re: statistical sorts <cassell@mail.cor.epa.gov>
    Re: System resources <cassell@mail.cor.epa.gov>
    Re: Thanks for the answers to -- autoresponder, BUT.... <cassell@mail.cor.epa.gov>
    Re: Unix NT differences <cassell@mail.cor.epa.gov>
    Re: what does eq do on lists? (Bart Lateur)
        Why would this autovivify - answers? opinions? <bivey@teamdev.com>
    Re: Win32::OLE + Word/Excel <andrewf@beausys.freeserve.co.uk>
        Win32::SerialPort tutorial and tpj.com <dchristensen@california.com>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Thu, 19 Aug 1999 13:14:20 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: %0 %1 %2 ????
Message-Id: <37BC659C.661EE41C@mail.cor.epa.gov>

Rick Lim wrote:
[snip]
> This is actually a working program someone else
> wrote that I have to modify , at the top of the file
> listing is the statement perl -S %0 %1 %2
> this I understand is the equivilant of #!/usr/bin/perl
> what I don't understand is the %0 %1 %2

Okay, then this is an MS-DOS batch [.bat] file which
reads in DOS command-line parameters before throwing
the inputs to a Perl program.  You can actually do this
yourself if you have a Perl program by running it through
the pl2bat.bat program which comes with ActiveState's
win32 Perl.

The %0 %1 %2 [etc.] look odd because they're not Perl
at all.  They're the inputs for the batch file.  If you
do this right, your first 14 lines will look like this
[snitch straight off a pl2bat'ed program]:

@rem = '--*-Perl-*--
@echo off
if "%OS%" == "Windows_NT" goto WinNT
perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
:WinNT
perl -x -S "%0" %*
if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl
if %errorlevel% == 9009 echo You do not have Perl in your PATH.
goto endofperl
@rem ';
#!perl -w
#line 14

Note the "" around the %0 .  You'll want to make that
change in case someday your file has spaces in its path.
After this, the Perl part will have its variables in the
usual @ARGV and you'll be set.  And this will go at the 
end of said program:

__END__
:endofperl

Good luck,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 19 Aug 1999 15:29:58 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Attn: CRAP (was Re: voting system pealse advise)
Message-Id: <x7zoznvaa1.fsf@home.sysarch.com>


boy, isn't life strange. i was carping about voting scripts in general
and we get this lovely post of one from matt's site.

i will do my CRAPPY duty and toast this code to a nice charcoal.

>>>>> "m" == marlee  <marlee@en.com> writes:

  m> hi, 

  m> i'm fairly new to using perl and I'm not quite sure what i'm doing.  I
  m> got this voting script from cgi-resource and i'm trying to modify it.

  m> the original script was set up to tally votes using radio buttons so
  m> that only one answer could be chosen.  when results were calculated it
  m> would add to the total of whichever choice was chosen.  i am trying to
  m> get it to use checkboxes instead and tally based on which boxes were
  m> marked "yes".  i have gotten it to add new choices successfully but i
  m> can only get it to add to the total of each choice or not add to any i
  m> can't seem to get it to determine which ones were checked.  here is the
  m> modified code below.  i have put stars around the sections that
  m> particulary interest me for this problem (a short section at the top and
  m> the subs showvote and vote).

this program is so broken i will not attempt to modify it for your
needs. instead i will do some commenting on how it is broken.

  m> thanks alot to anyone who attempts to takle this problem.

no, thank you for dredging up this abomination.


  m> #!/usr/local/bin/perl

no -w

no use strict

  m> # Congratulations!  You've finished defining the variables.  If you
  m> want to, # # you can continue screwing with the script, but it
  m> isn't necessary.  #

HA HA HA HA HA!!!!


  m> *if ($ENV{"REQUEST_METHOD"} eq 'GET') { $buffer = $ENV{'QUERY_STRING'};
  m> }       *
  m> *else { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
  m> }                         *

<snip>

roll you own cgi. here newsreader munged the code.

  m> # Get the topics

  m> open(DATA, "$data_path/vote.txt");

no check of the return from open. this is NEVER done on the dozen or so
opens in this script. i won't point them all out.



  m> print "Content-type: text/html\n\n";
  m> if ($FORM{'action'} eq "admin") { &admin; }
  m> elsif ($FORM{'action'} eq "add_topic") { &add_topic; }
  m> elsif ($FORM{'action'} eq "showvote") { &showvote; }
  m> elsif ($FORM{'action'} eq "others") { &others; }
  m> elsif ($FORM{'action'} eq "vote") { &vote; }
  m> elsif ($FORM{'action'} eq "results") { &results; }
  m> elsif ($FORM{'action'} eq "delete") { &delete; }

UGLY! make this into a dispatch hash.


my favorites are coming up. multiple prints and backwhacked quotes. a
single here doc fixes both, and makes this actually readable.

  m>                         print "<form method=\"GET\">\n";
  m>                         print "<input type=\"hidden\" name=\"action\"
  m> value=\"showvote\">\n";
  m>                         print "<input type=\"hidden\" name=\"topic\"
  m> value=\"$num\"><td width=\"50\">\n";
  m>                         print "<input type=\"submit\" value=\" Vote!
  m> \"></td></form>\n";


  m>         open (FILE,">>$data_path/vote.txt");
  m>         print FILE "$FORM{'topic'}|$lastnum|$FORM{'others'}\n";
  m>         close(FILE);

no flocking so this could collide with other hits to this cgi.

  m>         open (FILE,">$data_path/ch$lastnum.txt");

ditto



  m>                 for ($i = 0; $i <= $#data; $i++) {
  m>                         ($topic, $numt, $others) =
  m> split(/\|/,$data[$i]);
  m>                         print "<input type=\"checkbox\" name=\"$i\"
  m> value=\"-1\">$topic<ul>\n";
  m>                         open (FILE, "$data_path/ch$numt.txt");
  m>                         @choices = <FILE>;
  m>                         close(FILE);
  m>                         for ($j = 0; $j <= $#choices; $j++) {
  m>                                 ($name,$votes,$numc) = split(/\|/,
  m> $choices[$j]);
  m>                                 print "<li><input type=\"checkbox\"
  m> name=\"$i" . "X$j\" value=\"-1\">$name (<i>$votes votes</i>)\n";
  m>                         }
  m>                         print "</ul>\n";

the index loops are an eyesore to me. i try to never use c style for
loops if i can. looping over @data or @choices with separate counting
would be much easier to work with.

a proper design mught have the index numbers as part of the data file so
that wouldn't be needed either. 

  m> sub delete {
  m>         &checkpassword;
  m>         for ($i = $#data; $i >= 0; $i--) {
  m>                 ($topic, $numt, $others) = split(/\|/,$data[$i]);
  m>                 if ($FORM{$i})
  m> {                                                                        

again, the index is used as a cgi param name. this could be very
confusing or potentially buggy. 

i haven't even delved into the actual data or web design of this. i just
can't look at the code long enough without slurping some pepto-bismol.

this is the first cgi i would like to see rewritten for UNCRAP.

i removed this wrong group name and i doubt the original post nor my
followup would get into there.

comp.lang.perl.moderate

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: Thu, 19 Aug 1999 16:17:56 -0400
From: Heather Wiley <heather.wiley.fake@bentley.com>
Subject: directory reading
Message-Id: <37BC6674.A6F8B147@bentley.com>

I want to create an associative array with
filenames as a key and file size as a value

I currently have
opendir (ZIPDIR,$directory) ||  die "Can't open directory $directory
\n";
@filelist=grep(!/^\./,readdir(ZIPDIR));
closedir(ZIPDIR);

then I :
for $fname (@filelist) {
$fullname=$directory.$fname;
$flist{$fname}=-s $fullname;
}

can I do this in one step?

thanks
heather.wiley@bentley.com



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

Date: Thu, 19 Aug 1999 12:53:17 -0700
From: Andrew J Perrin <aperrin@mcmahon.qal.berkeley.edu>
Subject: Re: Dynamic File Handles
Message-Id: <37BC60AD.EB64E197@mcmahon.qal.berkeley.edu>

joneill wrote:
> 
> I am a Win32 user of Perl, and can't figure out this problem.
> 
 ...
> How can I dynamically create filehandles at runtime, and write to them
> based on input file contents?

Check out the FileHandle.pm module on CPAN - it will let you do
something along the lines of:

$files{01} = new FileHandle('>01.txt'); #resist the urge to use
$files{05} = new FileHandle('>05.txt'); # symbolic refs!
 ...

so you can call them easily.  Your code might look something like:

unless exists ($files{$record}) {
	$files{$record} = new FileHandle(">$record.txt");
}
print $files{$record} "Your data here\n";

Cheers-
Andy

-- 
-------------------------------------------------------------
Andrew Perrin - NT/Unix/Access Consulting -
aperrin@mcmahon.qal.berkeley.edu  
            I'M LOOKING FOR ANOTHER EXPERIENCED ACCESS
               DEVELOPER - CONTACT ME IF INTERESTED.
        http://www.geocities.com/SiliconValley/Grid/7544/
-------------------------------------------------------------


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

Date: Thu, 19 Aug 1999 13:05:58 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: FontMonkey
Message-Id: <37BC63A6.1E1E4840@mail.cor.epa.gov>

P.D. Magnus wrote:
[snip]
>     So, my question is this: should I make this available as freeware? I'd

Sure.  That's part of Perl.

> have to write some docs for it and so on, but it'd be no big deal if anyone

Docs would be nice.  You might consider the POD style for hard-core 
Perlites, or an HTML version for newbies.  There's a pod2html
program that comes with every current install of Perl.

> might use it. If such a things already exists somewhere or if it would fall
> still-born from the press, however, I'll just go on with other things.

Just because someone else has done something similar doesn't
mean it has been done well, or done like you did it.

>     I guess my question is as much about the Perl community as about
> anything. Is this the sort of thing that one makes publicly available?

Yes.  There are thousands of Perl CGI programs available on
the web.  Many of them have been criticized in this very
newsgroup.  :-)  If you use good perlstyle and check your errors,
you might want to consider seeing if it is suitable as a script
in either the CRAP project [see references to that in the archives of
this newsgroup] or the scripts on CPAN [see references to that here
too!].

If you're using GD.pm instead of trying to roll your own everywhere,
that's A Good Thing.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 19 Aug 1999 14:41:15 -0500
From: Jim Turner <jimt@netins.net>
Subject: GDBM Access in Perl
Message-Id: <37BC5DDB.EDDE6B87@netins.net>

I am new to database management in Perl and I'm having one
hell of a problem accessing a existing database.  To give a little
history:

We have had a serious problem with too many languages doing
too many different things in the past (too many cooks in the kitchen).
We are now in the process of converting all the aging python code
to perl.  I've hadn't had a problem until now and I'm not sure if it's
that I'm missing something in Perl, or I'm not accessing the dbm
correctly.

The python code opened the dbm like this:

    id_map = gdbm.open(customer_id_map_filename, 'w')

My perl eqivalent has been:

 $map = tie( $file, 'GDBM_File', 0644 )
    or die "\nDamn: $!\n";

Which nets me this error:

Can't locate auto/GDBM_File/TIESCALAR.al in @INC (@INC
contains: /usr/local/lib/perl5/alpha-dec_osf/5.00404
/usr/local/lib/perl5
/usr/local/lib/perl5/site_perl/alpha-dec_osf
/usr/local/lib/perl5/site_perl .)
at ./GDBMTest.cgi line 8

From what I can tell, TIESCALAR.al is _supposed_ to be a single
file, but it's not there and I can't find it anywhere.  And from what
I've
read, GDBM support is standard in perl 5.004_04, so why it can't
find a file that's part of the distribution is confusing.

I fully admit I may just be doing the tie() wrong, but I can't verify as
there
is zero documentation (from what I can find) on GDBM access in Perl.
Any help, suggestions, or fingers pointing me to better reading would be

greatly appreciated.

_________________
Jim Turner
Systems Administration
netINS, Inc.
jimt@netins.net



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

Date: Thu, 19 Aug 1999 14:53:28 -0400
From: Uriel Wittenberg <urielw@tiac.net>
Subject: Re: HARASSMENT -- Monthly Autoemail; Spammer Defiant
Message-Id: <37BC52A8.9E382C4F@tiac.net>

Tom Christiansen wrote:

> If someone asks me to stop mentioning to them every month or three that
> their postings have been mangled and maybe they should check into it, then
> I put an entry in the database so they don't get sent that reminder again.

On noticing this post this morning, I emailed you a fairly unmistakable
request. You complained it wasn't polite enough and indicated your spamming
would persist.



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

Date: Thu, 19 Aug 1999 12:24:16 -0700
From: Kazami Uchida <kuchida@slt.sel.sony.com>
Subject: How to remove an element from a multidimensional hash??
Message-Id: <37BC59E0.ECE5212@slt.sel.sony.com>

You have a multi-dimensional hash such as below and you want to know if
each family has a role named 'pal'.
If such a role does not exist, I want to print out all the roles of the
family. The output includes one extra role 'pal' which actually does not
exist. I believe this is due to the following expression used in an
lvalue context creating a new reference.

scalar(keys %{ $MultHash{$group}{'pal'} }

How can I remove this element from the multi-dimensional hash?

Or, is there any better way to see if there's a certain key element in a
multi-dimensional hash without creating an extra reference and to print
out only originally existing keys?

Thank you for your help.

Kaz Uchida

************* script begin ******************************

#!/usr/local/jptools/bin/perl

%MultHash = (
    flintstones => {
      lead => { fred => 1, },
      wife => { lin => 1, },
     },
    jetsons => {
         lead => { george => 1, },
         wife => { jane => 1, },
        },
    simpsons => {
   lead => { homer => 1, },
   wife => { marge => 1, },
         },
  );


foreach $group ( sort keys %MultHash ) {
  if( scalar(keys %{ $MultHash{$group}{'pal'} })==0) {
    foreach $real_role (sort keys %{ $MultHash{$group} }) {
      print "\$real_role for $group is $real_role\n";
    }
  }
}

************* script end ********************************

************* output begin ******************************

$real_role for flintstones is lead
$real_role for flintstones is pal
$real_role for flintstones is wife
$real_role for jetsons is lead
$real_role for jetsons is pal
$real_role for jetsons is wife
$real_role for simpsons is lead
$real_role for simpsons is pal
$real_role for simpsons is wife

************* output end ********************************




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

Date: Thu, 19 Aug 1999 13:12:45 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: How to remove an element from a multidimensional hash??
Message-Id: <37BC653D.53F58B6F@cisco.com>

[ Kazami Uchida wrote:
{ Code snipped....}

> The output includes one extra role 'pal' which actually does not
> exist. I believe this is due to the following expression used in an
> lvalue context creating a new reference.
> scalar(keys %{ $MultHash{$group}{'pal'} }
> How can I remove this element from the multi-dimensional hash?

This is autovivification in action.

> Or, is there any better way to see if there's a certain key element in a
> multi-dimensional hash without creating an extra reference and to print
> out only originally existing keys?

use exists() to see if a key exists.

--see sample below...

%MultHash = (
    flintstones => {
      lead => { fred => 1, },
      wife => { lin => 1, },
     },
    jetsons => {
         lead => { george => 1, },
         wife => { jane => 1, },
        },
    simpsons => {
   lead => { homer => 1, },
   wife => { marge => 1, },
         },
    kulkarnis => {
   lead => { makarand => 1, },
   wife => { sunitha => 1, },
   pal => { venkateswarlu => 1, },
         },
  );
$MultHash = \%MultHash ;
foreach $group ( sort keys %$MultHash ) {
  if( not  exists ( $MultHash->{$group}->{'pal'}  ) )
        {
    foreach $real_role (sort keys %{$MultHash->{$group}} ) {
      print "\$real_role for $group is $real_role\n";
    }
  }
}
~



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

Date: Thu, 19 Aug 1999 15:28:29 -0500
From: "James Liu" <jyoyoliu@hotmail.com>
Subject: Re: Newbie need help AKA Newbie's done
Message-Id: <PRZu3.1405$PY.116581@news.corecomm.net>

I've finsished.  I think it works.  It takes a text file, takes the info in
it, and creates an html file.  It's useful, as is, for people who want to
generate a lot of html files from txt, and are too lazy to copy paste
everything, and too principled to use  an editor.

I'll add meta tagging soon, but for now, i'm happy with it.

James Liu <jyoyoliu@hotmail.com> wrote in message
news:UnXu3.1336$PY.113993@news.corecomm.net...
> How do I create a new file?
>
> I looked through the Llama book, not there
> I looked at the FAQ and the manpages, couldn't find anything
> I cannot afford the Camel book.  I'm dead broke.
>
> I'm working on the command line of Win98.
>
>




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

Date: Thu, 19 Aug 1999 19:35:38 GMT
From: psdsp@my-deja.com
Subject: Re: Newbie need help
Message-Id: <7phma8$cji$1@nnrp1.deja.com>

In article <UnXu3.1336$PY.113993@news.corecomm.net>,
  "James Liu" <jyoyoliu@hotmail.com> wrote:
> How do I create a new file?
>
> I looked through the Llama book, not there
> I looked at the FAQ and the manpages, couldn't find anything
> I cannot afford the Camel book.  I'm dead broke.
>
> I'm working on the command line of Win98.
>
>
open(NEWFILE, ">d:\\tmp\\newfile") || die "could not open.\n";

print NEWFILE "I am born anew\n";

close(NEWFILE) || die "could not close.\n";

Read the perl faq available at www.perl.com

-Deva


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Thu, 19 Aug 1999 14:56:13 -0500
From: "James Liu" <jyoyoliu@hotmail.com>
Subject: Re: Newbie need help
Message-Id: <zmZu3.1404$PY.116036@news.corecomm.net>

thanks for the help.  that works

but i can't get perldoc to run. what manpage is it on?
Doran L. Barton <fozz@xmission.xmission.com> wrote in message
news:7phiun$btl$1@xmission.xmission.com...
> "James Liu" <jyoyoliu@hotmail.com> writes:
>
> >How do I create a new file?
> >I looked through the Llama book, not there
> >I looked at the FAQ and the manpages, couldn't find anything
> >I cannot afford the Camel book.  I'm dead broke.
>
> Use the open() function/sub to do this.
>
>   open FILEHANDLE, ">/path/to/file" or
>     die "Could not open file for writing";
>
> Don't forget to close it when you're done.
>
>   close FILEHANDLE;
>
> Good luck. Check out the 'perldoc' command. Do a 'perldoc -f open' for
more
> reference on the open() function.
>
> -=Fozz
>
> --
> Doran L. Barton = fozz@xmission.com && http://www.xmission.com/~fozz/
> ** Dynamic web developer, Perl hacker.  Using the Internet since 1990. **
>  "I have learned much more about Microsoft by using the Linux operating
>   system than I ever would have done by using Windows." - Neal Stephenson




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

Date: Thu, 19 Aug 1999 20:11:13 GMT
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: OOP in perl - not modules!!!
Message-Id: <7phobu$me5$1@monet.op.net>

In article <7pg3g9$6ik$1@nnrp1.deja.com>,  <prasad@chetana.com> wrote:
>I think that the complete style of OOP and not the reusable CPAN
>modules,the standard set of lines at the start of a typical class,the
>controlling program format(similar to one containing main() in c++) etc.
>needs to explained in a well paced man page by some perlwiz.

I did something like this in my very very short tutorial on how to
write a module.  The tutorial has two parts.  One part is about
writing a module that exports functions into its caller, and the other
is about writing an OO class module.  Each part has an example module,
an example sample program, and a list of exercises The source code
from the OO module part is only 25 lines long.

Part 3, which sill cover inheritance, it not finished yet,
unfortunately.  

http://www.plover.com/~mjd/perl/Hello/


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

Date: Thu, 19 Aug 1999 13:26:39 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: OOP in perl - not modules!!!
Message-Id: <MPG.1226085c72b10f7989e78@nntp.hpl.hp.com>

In article <x79077wwl1.fsf@home.sysarch.com> on 19 Aug 1999 12:42:50 -
0400, Uri Guttman <uri@sysarch.com> says...
 ...
> do you mean values in the object created by parent classes?  if so you
> are wrong. check out the new book "OO perl" by damian conway which shows
> you how to do that. it is being released right now.
> 
> and i think it is possible to do stuff to inherit class level variables
> too. i will ask him this week in monterey.
> 
> uri

I think your finger slipped onto the Shift key by accident.

tOO bad!

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Thu, 19 Aug 1999 19:51:02 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Perl compiler for DOS/Windows?
Message-Id: <37bd584d.1956208@news.skynet.be>

Jonathan Stowe wrote:

>For 16 Bit windows or extended DOS (The djgpp runtime can be got
>from <http://www.delorie.com>)

"runtime"? You'll give the guy nightmares, with visions of stuff
reminesent of Visual Basic!

Actually, it's some sort of extended memory driver. It's small, only a
few tens of k, and you only need it if NOT running under Windows.

	Bart.


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

Date: Thu, 19 Aug 1999 13:38:59 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perl compiler for DOS/Windows?
Message-Id: <37BC6B63.CB024C97@mail.cor.epa.gov>

Magnus Hult wrote:
> when coding Perl some time ago I found out it was very expensive
> (minute fee on telephone in Sweden) to be connected all the time while
> programming. Therefore I wonder: are there any Perl "compilers" that
> run under DOS or Windows, so that I can test my code disconnected? Else
> I'm going to be ruined.

Several people have already pointed you toward ActiveState Perl.
Make sure you have a copy of CGI.pm too.  Then you can test
your CGI programs locally as well.  Getting a free webserver for
your PC is a good idea too.  Pick up several browsers, so
you can check that everything works when viewed by the
popular browsers, as well as the good browsers.

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 19 Aug 1999 16:35:55 -0400
From: "Stephen Collins" <scollins@co-active.com>
Subject: Perl Exam Beta Testers Required
Message-Id: <rroqeequboh63@corp.supernews.com>

Would anyone like to beta test the Perl exam in a shortly-to-be-released
online technical screening system?




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

Date: 19 Aug 1999 20:04:12 GMT
From: zeadeATboink.stanford.edu <spammers_suck@[127.0.0.1]>
Subject: Perl regex matching problem (in a Java env)
Message-Id: <7phnvs$n95$1@nntp.Stanford.EDU>

I'm crossposting this to both comp.lang.perl.misc and
comp.lang.java.programmer because it includes a bit of both worlds.  

Anyway my problem in short is: I need to use a Perl5 regular expression to
match against HTML text.  The match needs to be blind to HTML tags entirely,
but given an HTML entity I need to replace it with a corresponding ASCII
string (which I have mapped in a hash, i.e. "&Tau;" gets mapped to "T").
This is the kicker, I can't really transform the HTML text in a way that
removes the HTML tags and entities from the process; I'm trying to use regex
matching to "highlight" text (surround the matched text with a set of HTML
tags) and spit the HTML text back out to be displayed.

At this point maybe an example would be best.

Given the regex: "\bthe\b.*?\bcowboy\b"

I would need it to match: "the <HTML_TAG> cow&beta;oy" (if blind to HTML
tags and with the entity replacement it turns into "the cowboy" for the
match).  The regex isn't always as straight forward as the above, and is
being generated by a simple translator which has its own set of rules to
follow, so messing around with the regex to match on is limited.

More complications: I'm doing this in Java code using OROMatcher and
PerlTools from ORO software (http://www.quateams.com/oro/).  So while I'm
able to use full Perl5 regluar expressions, I can't say use s///e, where I
could actually evaluate perl code in a substitution or other nifty Perl
tricks.  Using Perl directly isn't an option.

The best I can think of right now, is making a triple pass at the HTML text,
first replacing every HTML tag and entity with a token of somesuch (like a
control character of some sort, what exactly I don't know), and in the case
of the entity the following ASCII string, storing the replaced HTML
tags/entities in a Vector (remember this is Java).  Then running the match
where the regex would then look like:

"\b[tX][hX][eX]\b.*?\b[cX][oX][wX][bX][oX][yX]\b"

 ...where "X" is the yet unknown control char.  Then, going back through the
text and replacing the control chars with the HTML tag/entites stored in
place in the Vector.

Yoiks.

Not pretty and would take up a lot of time.

I feel I'm SOL here, but I'm hoping if someone might be able to shed some
light on a better way...


thanks,
Micah
(apologies for the email addr mungling)
-- 
perl -e's;^;nsiC%by:n19%o>o2z4on19%`"t2z`fn3o.%.2o.z.2o.g4og.5o.g.4o.4%;;\
s;$;f%.2o.n`fP"Y2>bP"Y2>bz`fzd2>t%`"Y>%`Pz)2>bgfP"Y2>bn%p#f8%.oP"#n%p#p;;\
s;$;.o>%d>(z#n____`Y>bod>Pt%`Yf2">o%__n;;s;#;ppfz;g;s;p;fg;g;s;_;ofo%;g;;\
s;z;2%;g;s;g;3%;g;s;f;3>;g;s;(\d+)(.);$2x$1;eg;y;t>%nC;\x278 \ng;;print;'


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

Date: Thu, 19 Aug 1999 15:13:28 -0400
From: dwilgaREMOVE@mtholyoke.edu (Dan Wilga)
Subject: Re: perl-DBI problem
Message-Id: <dwilgaREMOVE-1908991513280001@wilga.mtholyoke.edu>

In article <7phgcu$7p3$1@nnrp1.deja.com>, warmongr <brazell@bmh.com> wrote:

> Perhaps the wrong forum for this however, I am at my wits end.
> 
> When trying to load DBI.so from a script I get the following message:
> ----
> Can't load '/usr/lib/perl5/5.00503/i386-linux/auto/DBI/DBI.so' for
> module DBI: /usr/lib/perl5/5.00503/i386-linux/auto/DBI/DBI.so: undefined
> symbol: dirty at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm line
> 169.

The easiest way would probably be to reinstall DBI from scratch. That will
put the files in the right places for you. You can get it from
cpan.perl.org.

Dan Wilga          dwilgaREMOVE@mtholyoke.edu
** Remove the REMOVE in my address address to reply reply  **


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

Date: Thu, 19 Aug 1999 12:15:52 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: Q: How to get file contents from client
Message-Id: <37BC57E8.B9FC6250@cisco.com>

[ jizhang123@my-deja.com wrote: I
>I do not know if this is a right newsgroup for this question.
No this is not the right newsgroup.

> Some browsers support <Form> <Input Type=file Name=usr_attach>
> after visitor clicked submit button, how can I get the contents of the
> file from the client
> through CGI interface on  NCSA httpd server ?

Assuming that you are going to use CGI.pm for doing this I am going to
point to you some code from the book -
"OFFICIAL GUIDE TO PROGRAMMING WITH CGI.PM" -- Lincoln Stein
which has a good example on how to do this.
Follow --
http://www.wiley.com/compbooks/stein/source.html
and you will find what you need under "advanced Tricks".

open (OUTFILE, ">UploadedFile.txt" );  # Try to store uploaded file to
UploadedFile.txt
#....{other code }
while (<$file>) {
        $length += length($_);
        print OUTFILE  $_ ; # write each line to our file..
    }
The example merely calculates the length of the file uploaded. You
can easily modify it to save a file to disk as shown above.
--Makarand




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

Date: 19 Aug 1999 13:25:02 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: Q:Two perl programs printing to one txt file
Message-Id: <xkfvhabh8tt.fsf@valdemar.col.hp.com>

elephant@squirrelgroup.com (elephant) writes:
> my experiments are in Win32 .. could it be possible that you need to 
> seek on other OSs ?

My experiments on HP-UX have the same result-- ISTR the other Larry
showed that libc in general has this property?  I can't find my K & R
(2nd ed) to check.

-=Eric


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

Date: Thu, 19 Aug 1999 13:22:19 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Q:Two perl programs printing to one txt file
Message-Id: <MPG.12260756ef0c6b7d989e77@nntp.hpl.hp.com>

In article <xkfvhabh8tt.fsf@valdemar.col.hp.com> on 19 Aug 1999 13:25:02 
-0600, Eric The Read <emschwar@rmi.net> says...
> elephant@squirrelgroup.com (elephant) writes:
> > my experiments are in Win32 .. could it be possible that you need to 
> > seek on other OSs ?
> 
> My experiments on HP-UX have the same result-- ISTR the other Larry
> showed that libc in general has this property?  I can't find my K & R
> (2nd ed) to check.

You recall correctly.  K&R has nothing to do with it really, as it is a 
library issue, not a language issue.

From the ANSI/ISO C Standard:

Opening a file with append mode ... causes all subsequent writes to the 
file to be forced to the then current end-of-file, regardless of 
intervening calls to the fseek function.  In some implementations, 
opening a binary file with append mode ... may initially position the 
file position indicator for the stream beyond the last data written, 
because of null character padding.

 ...

I doubt that the last proviso applies in current operating systems, or 
is relevant to this problem.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Thu, 19 Aug 1999 12:19:14 -0800
From: chettah@msn.com ("willow")
Subject: Referring to "my" variables
Message-Id: <ZCZu3.3920$C%.2588764@WReNphoon3>

I am (still) new to Perl 5.  I have a program which uses my $sum in two
different subroutines.  After the subroutines execute, I would like to
compare the values of my $sum from each subroutine.  How can I reference
those?

sub caprecd {
open(CAPIN, "capin") or die "Unable to open capin: $!\n";
my $sum;
while (<CAPIN>) {
    $sum += substr($_,33,18);
    }
print "The total of dollars received and errored in = $sum\n";
#close CAPIN or die "Unable to close capin: $!\n";
}

sub capsent {
my $sum;
open(CAPOUT, "capout") or die "Unable to open capout: $!\n";
while (<CAPOUT>) {
     $sum += substr($_,33,18); }
print "The total of dollars sent and errored out = $sum\n";
#close CAPOUT or die "Unable to close capout: $!\n";
}

#&caprecd;
#&capsent;

my $diff = "$sum{CAPOUT} - $sum{CAPIN}";
if ( $sum{capsent} = $sum{caprecd} ) {
     print "Validation is successful \n";
}
elsif ( $sum{capsent} > $sum{caprecd} ) {
     print "Outgoing amounts are greater than incoming amounts by $diff\n";
}
elsif ( $sum{caprecd} > $sum{capsent} ) {
     print "Incoming amounts are greater than outgoing amounts by $diff\n";
}

I keep getting the error :Use of uninitialized value at validate.pl line 36,
<> chunk 148.

By the way, thanks to Larry and others for help in writing this.

Thanks,
Tara Pillion



   -**** Posted from RemarQ, http://www.remarq.com/?a ****-
 Search and Read Usenet Discussions in your Browser - FREE -


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

Date: Thu, 19 Aug 1999 13:49:40 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: Referring to "my" variables
Message-Id: <37BC6DE4.1B79475C@cisco.com>

[ willow wrote:

> After the subroutines execute, I would like to
> compare the values of my $sum from each subroutine.  How can I reference
> those?

Return refs to these my variables  -

$sum1 = sum1 ( 20, 30) ;
$sum2 = sum1 ( 20, 30) ;
print " sum1 = $$sum1 \n" ;
print " sum2 = $$sum2 \n" ;
exit ;
sub sum1 { my $sum = $_[0] + $_[1] ; return \$sum ; }
sub sum2 { my $sum = $_[0] + $_[1] ; return \$sum ; }
~



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

Date: 19 Aug 1999 15:04:35 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: Referring to "my" variables
Message-Id: <xkflnb7h47w.fsf@valdemar.col.hp.com>

chettah@msn.com ("willow") writes:
> I am (still) new to Perl 5.  I have a program which uses my $sum in two
> different subroutines.  After the subroutines execute, I would like to
> compare the values of my $sum from each subroutine.  How can I reference
> those?

The easiest way is to return the value of $sum from each subroutine, and
compare the returned values.

<a bit of rearranging>

> I keep getting the error :Use of uninitialized value at validate.pl line 36,
> <> chunk 148.

That would be because you're using -w.  Good!  It's also because you're
using a variable that you haven't given a value.

> sub caprecd {
> open(CAPIN, "capin") or die "Unable to open capin: $!\n";
> my $sum;
> while (<CAPIN>) {
>     $sum += substr($_,33,18);
>     }

Just as a point of reference, I'd recommend replacing that "33" and "18"
with constants (see 'perldoc constant').  Otherwise, nobody'll understand 
what you mean.

> print "The total of dollars received and errored in = $sum\n";
> #close CAPIN or die "Unable to close capin: $!\n";
> }
> 
> sub capsent {
> my $sum;
> open(CAPOUT, "capout") or die "Unable to open capout: $!\n";
> while (<CAPOUT>) {
>      $sum += substr($_,33,18); }
> print "The total of dollars sent and errored out = $sum\n";
> #close CAPOUT or die "Unable to close capout: $!\n";
> }
> 
> my $diff = "$sum{CAPOUT} - $sum{CAPIN}";

I'm guessing this is line 36?  You're looking in the %sum hash for values 
with the keys CAPIN and CAPOUT, but I don't see anywhere above where you
set those values, or use the hash at all.  I'm guessing you don't have
'use strict;' in effect, or it would have given you an error on this.

-=Eric


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

Date: Thu, 19 Aug 1999 19:10:36 GMT
From: tnguru@termnetinc.com (Ben Coleman)
Subject: Re: Running a perl process as service under Win NT
Message-Id: <37bc537c.86001884@news.mindspring.com>

On Tue, 17 Aug 1999 11:16:14 GMT, Jeremy Gurney <c4jgurney@my-deja.com>
wrote:

>You can't access networked files from your service unless you log your
>script in as a user and then you'll need to use UNC paths to get to
>them - the default account for services (LocalSystem) only has guest
>privaleges for network access.
> <snip>
>By design there is no way to have both network access and OLE (unless
>anyone knows different).

The exception to this comes, oddly enough, if you're accessing Netware from
WinNT Server.  You can then use Gateway Services for Netware to map a
Netware drive or directory to a 'local' drive letter accessable from
services running under LocalSystem.  We use this to let some WinCGI
programs running under Enterprise Server access flat-file databases on our
Netware server.

Ben
-- 
Ben Coleman
Senior Systems Analyst
TermNet Merchant Services, Inc.
Atlanta, GA


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

Date: Thu, 19 Aug 1999 13:28:00 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: statistical sorts
Message-Id: <37BC68D0.3749941B@mail.cor.epa.gov>

Marc Grober wrote:
> 
> I think Malcolm has it right. The distribution of a set of random samples would have
> arguably the statistically same distribution as the full population,

That's why they're called 'random' samples.

>                                                    but each random
> sample could be widely skewed when you think about it.

Yes, but the probability of such an event is quantifiable and
low.  If you want to control for such a feature, then you just
use a *better* probabilistic design.  You do NOT just pick stuff 
so it looks good.  That's a statistical no-no.

>                                                        O fcourse, the argument has
> been for years that sampling can represent the larger population (and a look at was is
> done with human paternity testing is enough to demonstrate that this is largely a
> crock..... but.....) but the reverse is another question altogether......

That is so totally wrong I can hardly bear it.  Centuries of
survey sampling in every realm you cna imagine have demonstrated
beyond repute that sampling, when done right, ALWAYS works.

The human paternity testing example has nothing to do with
representativeness of well-designed samples, and everything 
to do with misuse of data and abuse of basic concepts.
More or less as you're doing in that paragraph.

But a fuller discussion of such is way off-topic for this
group.  If you want info on sampling, ask in an appropriate
milieu.  sci.stat.math or sci.stat.consult come to mind.
 
> In any event, if the full population was large enougha random sample would be fine,
> but for 2 artifacts 1) a random sampling can't serve to place the entire population in
> one of the subgroups and 2) the populations I am dealing with is just several
> thousand.

Both your reasons are wrong.  A probabilistic sample can
handle subgroups well.  But you'd have to ask an expert
to do it for you, since you don't even believe survey
sampling works.  And the sample size doesn't preclude 
sampling either.

But you're scared of using a sample and your population is
of a manageable size?  Then do a census if you can afford to.  
Get every observation.  Then there is no peculiarity 
introduced by your random sample, and no statistical work
to do afterward.  There will be no sample variance, since
you don't have a sample.  Of course, any index-period
variability or missing values will muck that up nicely...

> anyway......... any other ideas as to existing perl apps out there or CPAN stat
> modules that could be useful?

Yes.  If you want the entire population, you don't need
Stat::Descriptive or Math::Random or any of the other modules
on CPAN which might help if you were to consider a simple
random sample.  If you do attempt a more sophisticated
sample design [as is probably the actual appropriate case
here], you would have to write your own Perl code to do
the estimators.  Or pay a statistical-computing expert 
to design your survey and analyze your data.

Accept no substitutes.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 19 Aug 1999 13:36:49 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: System resources
Message-Id: <37BC6AE1.DFF9866C@mail.cor.epa.gov>

asssi@my-deja.com wrote:
> 
> When programming for the NT platform, what do you think would run
> faster, an executable code compiled from C language (EXE) file or a perl
> script?

If you really don't know, you probably shouldn't be programming
in C.  C should be faster, unless you're doing something with
regexes that benefits from Perl's hand-krufted code and
is penalized by a slow C library which does the same work but
less efficiently [there are some good C regex libraries out
there though, so this shouldn't come up].  There are other areas
where you could get hurt by writing inefficient code or using
someone else's inefficient code, such as autovivification
or automatic growing of data structures.  But C *should* be
faster.

That said, you should also know that in some problem spaces,
such as web programming, the issue won't be the speed of
the Perl/C programm but the bottlenecks elsewhere.  CGI is
a good^W bad example here.  Moving to fast_cgi or mod_perl
or Velocigen or PerlEx [or another alternative] will get you
more speed than writing your small piece of code in C instead
of Perl.  Database connections can be another bottleneck.

And in many cases, you're probably better off writing the
front end in Perl and the computational bits in C, then
interfacing.  The Perl docs tell you how.
 
> I need that for an application that will have to deal with massive
> traffic, so it becomes critical,

Massive *web* traffic?  Re-read what I wrote above.  Then
check out the Perl FAQ for ways to speed things up.

> thanks
> 
> please also reply to this via email at asssi@deja.com

That's not what I get for your address when I tried to e-mail
you, and it's too much trouble for me to fiddle with it
in this lousy newsreader.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 19 Aug 1999 13:45:05 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Thanks for the answers to -- autoresponder, BUT....
Message-Id: <37BC6CD1.24AD00AB@mail.cor.epa.gov>

Nicholas Barnaby wrote:
> 
> Thanks for your response to my question on the autoresponder especially
> David. But I guest I should have asked, how do I write a script in perl that
> knows when there is new incoming mail on Unix environment.
> SYNOPSIS: If I am going away for a couple of weeks, I would like if an email
> is sent to my account a response is sent back to the sender telling them
> about my status.

Since you're on unix, you don't have to do this.  The 'vacation'
program does this for you automagically.  

But if you do this [in Perl or not], please please please,
unsubscribe from any listservs, so you don't bounce replies
to every single message you get.  Otherwise you may get tossed
from your favorite lists, and earn much enmity from people
who would otherwise be your correspondents.

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 19 Aug 1999 13:57:11 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Unix NT differences
Message-Id: <37BC6FA7.995334A8@mail.cor.epa.gov>

Geoff Smith wrote:
> 
> I'd be grateful if someone could help me with a search script and my perl
> knowledge is pretty much limited to cut and paste.
> 
> I was using Fluid Dynamics "Intermediate Search" quite happily on my web
> site to search may pages. But then my ISP changed from Apache on Unix to ISS
> on NT.
> 
> I've managed to get the script running again but it never finds any hits,
> even on words I know exist in my files. I think that the script is not
> finding any files to search and that it is something to do with file and/or
> directory naming differences on NT compared to Unix.
> 
> Can anybody offer any assistance? If you want to see the script as it stands
> at the moment let me know... I didn't think it appropriate to post it in the
> newsgroup

You can read all the exciting diffs in the perlport manpage.
You can read that if you have Perl properly installed on your
system just by typing this:

perldoc perlport

perldoc is a program which comes with installs of Perl these
days.  But here's the key point.  You have to make sure
you're pointing at the right files in the right directories.
If your ISP switched from unix to NT, you can't assume
that your files are in the same directory structure; or that
your web program is run as the same user as before in the
same location [so be sure to use absolute rather than
relative paths].  Perl lets you use unix slashes for
your path separators.. but anything that gets handed to
MS-DOS had better have what cmd.exe is expecting.

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Thu, 19 Aug 1999 19:50:57 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: what does eq do on lists?
Message-Id: <37bc575e.1716680@news.skynet.be>

Sam Holden wrote:

>@ar = (1,2,3,4);
>@ar[1,2] = (10,20);
>
>Changes the values in @ar. How can I modify a list?

$x = 'a'; $y = 'b';
($x,$y) = (10,20);

Apparently, in more than one way.

Think of the left side as an enumeration of destinations for the
assignment.

	Bart.


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

Date: 19 Aug 1999 19:58:38 GMT
From: "William" <bivey@teamdev.com>
Subject: Why would this autovivify - answers? opinions?
Message-Id: <01beea7c$f150c800$583c08cf@bill.jump.net>

I've got a bit of a puzzler, any suggestions, or
FAQ references (I looked, but nothing popped out
at me) would be appreciated (or just tell me
I've done something dumb). What's really annoying
is that the code has been operating for some time,
and I've only now discovered this. I'm using
ActiveState Build 517 (Win32).

Executing this line

   $g_CurHashRef = \%{$g_DescHash{$Label}};

produces the effect in %g_DescHash seen below:

Before:
'XX3A' => HASH(0x68b09c)
      'XA1' => ARRAY(0x68acb8)
         0  0
         1  10
      'XA3' => ARRAY(0x68ad18)
         0  20
         1  3

After:
'XX3A' => HASH(0x68b09c)
      '' => ARRAY(0x702a54)
           empty array
      'XA1' => ARRAY(0x68acb8)
         0  0
         1  10
      'XA3' => ARRAY(0x68ad18)
         0  20
         1  3

Doing this:
    %CurHash = %{$g_DescHash{$Label}};
works fine (I'd say, "as expected" but at this point
my expectations are pretty low). I can live with the
change, but I'd like to know what's wrong.-Wm




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

Date: Thu, 19 Aug 1999 21:10:47 +0100
From: Andrew Fry <andrewf@beausys.freeserve.co.uk>
Subject: Re: Win32::OLE + Word/Excel
Message-Id: <+QhwxAAHTGv3Ewbh@beausys.freeserve.co.uk>

In article <7phaue$8s8$1@news.mch.sbs.de>, Michel Dalle
<michel.dalle@usa.net> writes
>In article <32zSYAAKawu3EwQN@beausys.freeserve.co.uk>, Andrew Fry <andrewf@beaus
>ys.freeserve.co.uk> wrote:
>>Anyone know to use WIn32::OLE to...
>>1. Determine how many lines are in a Word document,
>>   and then read these lines ?
>>2. Determine how many rows/cols are occupied in an
>>   Excel document, and then read the cells ?
>>   (Actually, I think I know how to read the cells...).
>>
>>I've been reading the ActivePerl documentation, but it
>>doesnt go very far. Very few examples about.
>
>Well, I'd suggest you re-read the following ActivePerl FAQ :
>"Using OLE with Perl".
>
>The following topics are quite interesting :
>        - How do I convert a VBA macro to Perl?
>        - Where do I find documentation for the object models?
>
>So, have you tried opening Word/Excel and do what you want in
>a VBA macro to see what it looks like ? Why not ?
>After all, you are manipulating Word and/or Excel here, not Perl.

Of course, but I am using Perl to do it ... not VBA.

>
>For example, Word works with documents, content, ranges,
>paragraphs, etc. It's all in the Word helpfile :-)
>
>Have fun,
>
>Michel.

Well, I have next to no experience of VBA, but I dont see how
writing VBA macros and reading the Word helpfile is going to
help me understand what it is I have to write in Perl to do
precisely what I want to do.

---
Andrew Fry
"Time flies like an arrow. Fruit flies like a banana". (Groucho Marx).


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

Date: Thu, 19 Aug 1999 13:31:55 -0700
From: "David Christensen" <dchristensen@california.com>
Subject: Win32::SerialPort tutorial and tpj.com
Message-Id: <37bc676b@news5.newsfeeds.com>

Hello, World!

I am trying to figure out Win32::SerialPort using AP519 on Win98.
There is supposed to be a tutorial in issue #13 (March 1999) of The
Perl Journal, but I can't seem to connect to tpj.com -- I assumed
they're swamped (?).  Does anybody know of a mirror, or someplace
where I can get a copy of the tutorial?

TIA,

--
David Christensen
dchristensen@california.com





  -----------== 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: 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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu. 

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 592
*************************************


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