[16687] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4099 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 22 21:05:46 2000

Date: Tue, 22 Aug 2000 18:05:23 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <966992722-v9-i4099@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 22 Aug 2000     Volume: 9 Number: 4099

Today's topics:
    Re: #ifdef filtering program ? (Martien Verbruggen)
    Re: Best General HTTP Proxy? (Randal L. Schwartz)
    Re: Best General HTTP Proxy? <mkruse@netexpress.net>
        Building Anonymous Hashes <smerr612@mailandnews.com>
    Re: Building Anonymous Hashes (Marcel Grunauer)
        CGI.pm - object-oriented - file upload problem <peterpm@xs4all.nl>
        flock() does not work on HP-UX medi@cybershell.com
        Functions and reference notation. (Anno Siegel)
    Re: Hash List Comparing <tim@ipac.caltech.edu>
    Re: Hashref infix misunderstood? (Soren Andersen)
    Re: Hashref infix misunderstood? (Soren Andersen)
    Re: how convert to binary, hex etc (Anno Siegel)
    Re: long-to-short dir/filenames (Eric Bohlman)
    Re: Parse::Recdescent questions (<commit> and other pro <ocschwar@mit.edu>
    Re: Parse::Recdescent questions (<commit> and other pro (Damian Conway)
    Re: Parse::Recdescent questions (<commit> and other pro <ocschwar@mit.edu>
    Re: Parse::Recdescent questions (<commit> and other pro <ocschwar@mit.edu>
    Re: Perl + Administration of NT4 <g.chapman0749@home.com>
        Perl/MySQL vs ASP/MS-SQL af778@iname.com
    Re: Perl/MySQL vs ASP/MS-SQL (Malcolm Dew-Jones)
    Re: Perl/MySQL vs ASP/MS-SQL (Steve Leibel)
    Re: PLEASE HELP !!! What is wrong with Windows... (Eric Bohlman)
    Re: procmail, perl and DBD::Oracle <maldito@omnisky.net>
    Re: Programming Ethics (Steve Leibel)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 23 Aug 2000 00:17:41 GMT
From: mgjv@verbruggen.comdyn.com.au (Martien Verbruggen)
Subject: Re: #ifdef filtering program ?
Message-Id: <slrn8q660d.ma.mgjv@verbruggen.comdyn.com.au>

[Please, in the future, put your reply AFTER the suitably shortened
included test you are including.]

On Tue, 22 Aug 2000 18:19:56 GMT,
	sibban@my-deja.com <sibban@my-deja.com> wrote:
	
[article reorganised to respect the arrow of time and reformatted]

> In article <slrn8q5620.5ap.mgjv@martien.heliotrope.home>,
>   mgjv@tradingpost.com.au wrote:
> >
[snip]
> > But I would definitely use a real C preprocessor, if at all possible.
>
> The program shall only filter any textfile according to "define"
> flag(-s) passed as input arguments, regardless of the file's
> content.  No preprocessing of any kind is wanted except for handling
> of the mentioned #ifdef clauses that enclose the text chunks to be
> filtered out (or preserved).
> 
>  How would you prevent "language specific" preprocessors from
>  imposing semantics on the file content ?

\begin{offtopic}
Hmm.. The GNU cpp accepts the -undef flag to do this, so does Sun's. 
\end{offtopic}

\begin{ObPerl}
You could write a reasonably simple Perl program that uses a state
machine or something like that, and that parses these things. Have you
had a look at Filter::cpp at all? I haven't yet, but the name sounds
promising.

# perl -MCPAN -e shell
cpan> look Filter::cpp
$ perldoc -F lib/Filter/cpp.pm
[snip]
DESCRIPTION
    This source filter pipes the current source file through
    the C pre-processor (cpp) if it is available.
[snip]

Looks like it does the same thing as -P is supposed to do... Not
useful. So my original recommendation stands: Use cpp. Alternatively,
write a little state machine that keeps track of things.
\end{ObPerl}

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Unix is user friendly. It's just
Commercial Dynamics Pty. Ltd.   | selective about its friends.
NSW, Australia                  | 


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

Date: 22 Aug 2000 15:41:45 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Best General HTTP Proxy?
Message-Id: <m1wvh89avq.fsf@halfdome.holdit.com>

>>>>> "Matt" == Matt Kruse <mkruse@netexpress.net> writes:

Matt> MY GOAL: I want a general "debugging" proxy. When
Matt> browser<->Server communications don't seem to be happening the
Matt> way I expect (cookies, expires headers, authentication, etc) I
Matt> want to view exactly what is happening.

My "anonymizing proxy in 90 lines of Perl" from one of my early
WebTechniques columns can do just that.  My columns are online at

        http://www.stonehenge.com/merlyn/WebTechniques/

Matt> What I'd like to do is insert the request and response headers
Matt> into the HTML document at the top, as plain old text. It may
Matt> look weird, but I don't care - this is just for testing.

Be very careful to escape doubled minuses properly in the comments.
Wouldn't want to get you out of comment mode prematurely or stay in
comment mode too long.  For example, as HTML, this is one long
comment:

        <!-- A -- B --> still in a comment <!-- C -- D -->

and proper browsers will not show "still in a comment", even though
non-compliant browsers such as Mozilla and IE might.  That's because
the comment at A is looking for a double dash, and at B looking for a
greater-than, but the double-dash immediately after still puts it into
the looking-for-double-dash mode, and the greater-than is not seen
(wrong state).  If we saw a greater-than at C it would end, but I add
two more pairs just so that non-compliant browsers will think the
second <! starts another comment. :)

Matt> A Proxy that would correctly handle SSL would be a bonus.

SSL proxying requires support of the CONNECT method, which means the
proxy sees nothing, so you wouldn't be able to rewrite the HTML.  So
if you mean to support it in the sense that you can make a CONNECT
work, that's just a matter of turning the webserver into a dumb pipe,
but if you mean also seeing all the headers back and forth, you lose.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Tue, 22 Aug 2000 18:11:52 -0500
From: "Matt Kruse" <mkruse@netexpress.net>
Subject: Re: Best General HTTP Proxy?
Message-Id: <39a3085d$0$11340@wodc7nh0.news.uu.net>

Randal L. Schwartz <merlyn@stonehenge.com> wrote:
> Be very careful to escape doubled minuses properly in the comments.
>         <!-- A -- B --> still in a comment <!-- C -- D -->

Interesting. I had never seen that example before.

> Matt> A Proxy that would correctly handle SSL would be a bonus.
> SSL proxying requires support of the CONNECT method, which means the
> proxy sees nothing, so you wouldn't be able to rewrite the HTML.

Okay, i wasn't clear. In fact, I didn't even say it right.

I was thinking there could be a different way to handle this. The web
browser would encrypt and send the request to the proxy. The proxy would
decrypt, keep track of the request, then re-encrypt to how the web server
expects, send the request, get the response, decrypt it, re-encrypt for the
client, and send it.

So the "proxy" would function more as a relay or repeater. In this scenario,
you wouldn't be able to just use the proxy as a passive proxy, but instead
would have to connect to the proxy as if it were the web server, and it
would go do the fun stuff and just return you the content. This would be
practical for short-term tests and analysis of problems through SSL, which
is something that happens on occassion.

I've used perl's HTTP and libwww stuff before, but never looked into whether
anything existed to automate the SSL process as I've described it above.

--
Matt Kruse
http://www.mattkruse.com/





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

Date: Tue, 22 Aug 2000 22:12:51 GMT
From: Steven Merritt <smerr612@mailandnews.com>
Subject: Building Anonymous Hashes
Message-Id: <8nutsi$ieq$1@nnrp1.deja.com>

I've got a data file I'm working on parsing and putting into an array of
hashes. Here's the basic method, I know the parsing works, when I put in
temp variables and print them out I get what I'm looking for, but when I
try to assign them to an anonymous hash and then push it once all the
hash slots are filled for a particular record, I get warnings saying it
didn't fill the variables when I try to print the hash(Use of
uninitialized variable...)


foreach $_ (@LogLines){

     next if (/^\s\n/);

# Is the current line the header for the record, containing
# date and time information, operator and status?

     $Record = ();
     if (/^\+>*/) {

#  Snag the timestamp, positions 3-20, if it doesn't exist we want
#  to erase the old data

       $Record-> {Timestamp} = substr($_, 2, 17);
#       print "$timestamp \n";

#  Split the rest of the first line to get the operator(s)
#  and status


       ($Record-> {Oper}, $Record-> {Status}) = split /Status: /,
substr($_, 22);

# Status is an optional field, but we need to fill it if there is no
# value

       if (! $Record{Status} ) {
           $Record-> {Status} = "None";
           }

        }

#  That takes care of the top line, now we need to get
#  the data in the other fields.  From the format of the
#  data file, we need to get all the other fields

        elsif (/^\s+Release:*/) {
          $Record-> {SR} = $_;
          print $Record{SR};
          }
          elsif (/^\s+Referencing Party:*/) {
                $Record-> {Ref_Party} = $_;
               }
                elsif (/\S/) {
                    $Desc = $_;
                    foreach $_ (@LogLines){
                      last if (/^\s\n/);
                      $Desc = $Desc . $_;
                      }
                $Record-> {Desc} = $Desc;
                }
}

# Is our record full?

if ($Record{Timestamp} && $Record{Status} && $Record{Desc} &&
$Record{Oper} && $Record{Release} && $Record{Ref_Party}){
  push @Recs, $Record;
  $Record = {};
  }
}

and I'm printing them like this

foreach $match (@Recs){
    print $match{Timestamp};
    print $match{Name};
    print $match{Status};
    print $match{SR};
    print $match{Applid};
    print $match{Environ};
    print $match{Ref_Phone};
    print $match{Ref_Party};
    print $match{Pegasys_EER};
    print $match{Desc};
}

I've looked at the examples I've found in both the Camel and the
Leopard, but it's only running through the loop once and isn't filling
the variables even then.

Next step would be to use the temp variables and construct the anonymous
hash after all the temp variables are full, then push it on the array.

Steven
--
King of Casual Play
The One and Only Defender of Cards That Blow

My newsreader limits sigs to four lines, but I cleverly bypassed this by


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Tue, 22 Aug 2000 22:28:03 GMT
From: marcel@codewerk.com (Marcel Grunauer)
Subject: Re: Building Anonymous Hashes
Message-Id: <slrn8q5vja.kjc.marcel@gandalf.local>

On Tue, 22 Aug 2000 22:12:51 GMT, Steven Merritt
<smerr612@mailandnews.com> wrote:

>I've got a data file I'm working on parsing and putting into an array of
>hashes. Here's the basic method, I know the parsing works, when I put in
>temp variables and print them out I get what I'm looking for, but when I
>try to assign them to an anonymous hash and then push it once all the
>hash slots are filled for a particular record, I get warnings saying it
>didn't fill the variables when I try to print the hash(Use of
>uninitialized variable...)
[...]
>
>       if (! $Record{Status} ) {
>           $Record-> {Status} = "None";
>           }
>

You seem to be mixing $Record (a hash ref) with %Record (a hash). If
$Record is all you have (i.e., you don't intend to use %Record - I don't
know what other variables you use in addition to the code you showed),
you have to stick to the $Record->{$key} form.

>          $Record-> {SR} = $_;
>          print $Record{SR};

Ditto.

>                      $Desc = $Desc . $_;

$Desc .= $_;

>if ($Record{Timestamp} && $Record{Status} && $Record{Desc} &&
>$Record{Oper} && $Record{Release} && $Record{Ref_Party}){

Ditto the '->' issue.

>foreach $match (@Recs){
>    print $match{Timestamp};
>    print $match{Name};
>

Ditto.

There may be other issues with the data structures or algorithms you use,
but I've only really glanced at the code.


-- 
Marcel Gr\"unauer - Codewerk plc . . . . . . . . . . . <http://www.codewerk.com>
Perl Consulting, Programming, Training, Code review . . .  <marcel@codewerk.com>
mod_perl, XML solutions - email for consultancy availability
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();


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

Date: Wed, 23 Aug 2000 02:29:13 +0200
From: "Peter Mooring" <peterpm@xs4all.nl>
Subject: CGI.pm - object-oriented - file upload problem
Message-Id: <8nv593$8ik$1@news1.xs4all.nl>

Hi,
I want to upload files using CGI.pm in object-oriented style, i.e. using:
new CGI, $query->param, etc.
(the function-oriented style works but I cannot use it)
The documentation says that it can be done if you get the upload param in
the same module
where the use CGI.pm statement is.
Still I just don't get a value returned from $query->param('upload') after
submitting a file from a
browser.
I'm stuck here.
Anybody any suggestions?

Thanks,
Peter






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

Date: Wed, 23 Aug 2000 00:43:34 GMT
From: medi@cybershell.com
Subject: flock() does not work on HP-UX
Message-Id: <8nv6ni$sj5$1@nnrp1.deja.com>

I'm experiencing some difficulties with flock() on HP-UX.
Has anyone else been here?

OS = HP-UX mars B.11.00 A 9000/800
Perl -v = 5.005_03 built for PA-RISC2.0

The following is a test script to test locking on this OS. It
works on Linux. The problem seem to be the functionality passed
to flock() as in Exclusive Lock, vs Unlock, etc...

open(LOCK, "> some.LOCK") || die $!; Note how HP  mandates O_RDWR
flock(LOCK, 1) || die $!;
print "Locked \n";
print "Hit return to continue..."; $junk = <STDIN>;
flock(LOCK, 0) || die $!;
print "unlocked\n";
close(LOCK);

I get the following output....

locked
Hit return to continue....
Invalid argument at ./goo line 12, <> chunk 1.

So it works its way down to locking and prompting, then it
fails on unlocking. I got the parameters to flock() from
lockf(2) and "/usr/include/sys/unistd.h" which reads

#  define F_ULOCK  0   /* Unlock a previously locked region */
#  define F_LOCK   1   /* Lock a region for exclusive use */
#  define F_TLOCK  2   /* Test and lock a region for exclusive use */
#  define F_TEST   3   /* Test a region for a previous lock */



Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 22 Aug 2000 23:22:05 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Functions and reference notation.
Message-Id: <8nv1ut$2k5$1@lublin.zrz.tu-berlin.de>

Abigail <abigail@foad.org> wrote in comp.lang.perl.misc:
>Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMDXLVIII
>September MCMXCIII in <URL:news:8nu3fg$1jp$1@lublin.zrz.tu-berlin.de>:

[ $hash->{ $x} can be used for $hash{ $x}. Bah. ]

>Well, that's not a very Perlish way of thinking, now is it? Most programming
>languages make the programmer a slave of the language and/or compiler.
>But there's an amazing score of people who like to be bossed around and 
>think they should be slaves of Perl as well.
>
>The Perlish way of thinking is: "Hmm, there's a -> there. That means, I
>someone got to interpret the left hand side as some kind of reference.
>It's a hash, good, I can guess what the programmer means."
>
>*That* is Perl. If you want Java or Python, you know where to get it.

The wavier the sea, the more you want a few beacons that seldom fail.
"->" is such a thing, and while I can live with it failing a little
more often than it used to, I don't have to welcome it.

It is also Perlish to have "$" pretty reliably say "this is a
scalar", and similar for "@" and "%".  You need something to hold
on to in a language where "(" and "{" say so little.

When I really curse the DWIMer is when I try to make sense of
beginner's code.  That's when I whish for a language with few,
strict, and simple rules.

>{} the left of it is a reference of some kind.  All documented uses
>{} of "->" follow that rule, with the exception that you can call
>{} a class method via Classname->method(), where Classname can be a
>{} bareword or a string.
>
>Or rather, where Classname is a string. It's just that if you use a
>bareword, Perl guesses that you really wanted to use a string, so it
>treats it like a string. And, conveniently, using a bareword only issues
>a warning if the bareword doesn't start with a capital letter.

True.  A package name is a string, it's only more often given as a
bareword than others.

Anno


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

Date: Tue, 22 Aug 2000 15:10:33 -0700
From: Tim Conrow <tim@ipac.caltech.edu>
Subject: Re: Hash List Comparing
Message-Id: <39A2FA59.DD0FC4B7@ipac.caltech.edu>

ScapS wrote:
> I fill a hash with input from a User
> But the User should fill at least the first 4 fields:
> ... snip ...
> Or the first 4 fields must be empty
> Anything in between should return an error page:

So what have you tried? What happened? What don't you like about your
implementation that you'd like us to help you improve?

This newsgroup helps best those that help themselves.

Here's a code fragment you may wish to investigate. It doesn't do *exactly* what
you want (but it's very close), so you'll need to fix it.

my @need =  qw(A B C D);
my %hash = (A=>1,B=>"",C=>"",D=>"");
die "Error" if grep(! ($hash{$need[0]} xor $hash{$_}),@need) != @need; 

[Making the error appear in a web page I leave entirely to you.]

--

-- Tim Conrow         tim@ipac.caltech.edu       626-395-8435


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

Date: 22 Aug 2000 22:53:00 GMT
From: soren@spmfoiler.removethat.wonderstorm.com (Soren Andersen)
Subject: Re: Hashref infix misunderstood?
Message-Id: <8nv08c$j3m$1@slb3.atl.mindspring.net>

kcivey@cpcug.org (Keith Calvert Ivey) wrote in 
<39a88016.49085414@news.newsguy.com>:

>soren@spmfoiler.removethat.wonderstorm.com (Soren Andersen)
>wrote:
>
>>for (($d,$f) = each (%$PNGs))  {
>> print ' ', $d, '   ', $f, "\n";
>>}


>You want while(), not for().

Or:
for (sort keys %$PNGs)  {
 printf " %40s  %-u\t %40s  %-u\n",$_ ,$Gsizes->{$_},$PNGs->{$_},$Psizes->{$_};
}
I got it fixed after I posted; I realized it was using "for" with "each" that 
was messing me up. I decided I like it this way, your suggestion is good too, 
and appreciated.

I am not even going to answer the pedant who wasted enormous bandwidth starting 
with ranting about "use strict". I'll "use strict" if I want to. And I am not 
interested in anybody's "points" system. I code for love of it, not for esteem 
in the eyes of others (ego). There are a whole buncha attitudinal things that 
have gone incredibly too far in this Perl ng psuedo-world. Bunches of wannabee 
teachers who arrogantly pontificate instead of (if they see it) just pointing 
out what isn't working and why. God, it takes all kinds I guess. But my advice 
to new participants: don't emulate what you see going on here. And 
fundamentally don't rely on a ng to learn how to code Perl. Mostly these fora 
are about people expressing their cramped neurotic personalities; good books or 
classes (stuff you pay for) are a better way to learn to program Perl.


soren andersen


-- 
Using PNG-format images as Web BACKGROUNDs without
"breaking your Site" for silly older browsers:
http://www.wonderstorm.com/techstuff/
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: 22 Aug 2000 22:57:26 GMT
From: soren@spmfoiler.removethat.wonderstorm.com (Soren Andersen)
Subject: Re: Hashref infix misunderstood?
Message-Id: <8nv0gm$j3m$2@slb3.atl.mindspring.net>

Ahh, I forgot to post all the code --maybe somebody someday will find it
useful. And I apologize for my previous rant tagged on to the reply to a
poster who just helped me, and I apologize to the target of that rant. I
am very tired and under stress. The poster targeted did, after all, respond
(whether I liked the response or not).

The Code:


-----------------------
#!perl -w

use vars qw|$dir $gif $PNGs $Gsizes $Psizes $sp |;
use File::Spec;
$dir = $ARGV[0];
$dir =~ s#\\#/#g;
print "Now we are opening ",
   ($dir = File::Spec->rel2abs ($dir)), "\n";
opendir (GRAF, "$dir") or die "Couldn't open $dir\n$!";
for (grep /\.gif$/i, (sort readdir GRAF))  {
  $gif = $_;
  $Gsizes->{$_} = -s $gif;
  s#\.gif$#.png#i or warn "no .gif extension?!";
  $PNGs->{$gif} = $_ if ($sp = -s $_);
  $Psizes->{$gif} = $sp;
}
closedir (GRAF);
print "Listing of paired GIFs and PNGs: \n";
for (sort keys %$PNGs)  {
 printf " %40s  %-u\t %40s  %-u\n",$_ ,$Gsizes->{$_},$PNGs->{$_},$Psizes->{$_};
}

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

   soren andersen





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

Date: 22 Aug 2000 23:39:04 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: how convert to binary, hex etc
Message-Id: <8nv2uo$2lm$1@lublin.zrz.tu-berlin.de>

Larry Rosler  <lr@hpl.hp.com> wrote in comp.lang.perl.misc:
>In article <8nulca$20q$1@lublin.zrz.tu-berlin.de> on 22 Aug 2000 
>19:47:22 -0000, Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> says...
>> Samuel Irlapati <samuel.irlapati@unisys.com> wrote in comp.lang.perl.misc:
>> >How do you convert a decimal number say to hexadecimal and then shift it by
>> >one digit to the right and then convert it back to decimal?
>> 
>> By some combination of sprintf, substr, and oct, all to be found in
>> perldoc -f.  Perhaps string concatenation comes in handy somewhere,
>> though it isn't strictly necessary.
>
>Hmmm...  Posted two minutes before your correction to Greg Bacon's 
>approach, which uses none of the above.

I guess I failed to recognize an XY problem.  The OP's question above
asks about a step-by-step process. In fact it sounds a bit like an
assignment that includes the way it must be done.  It didn't occur
to me that int( $x/16) would be a viable solution, so I showed him
the tools to do it his way.

Anno


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

Date: 22 Aug 2000 22:13:59 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: long-to-short dir/filenames
Message-Id: <8nutv7$dc0$8@slb3.atl.mindspring.net>

[followups limited to comp.lang.perl.misc]

Giovanni Loc (newsgroup@pmail.net) wrote:
: I'm using an old dos program that accept a @filelist.txt of short 8.3-format
: filenames for input
: 
: the problem is that I have this filelist.txt  with LONG dir/filenames,
: like:
: 
: c:\mydirectorya\subdirectorya\longfilename.txt
: c:\mydirectoryb\subdirectoryb\longfilenameb.txt
: c:\foobar\onetwothree.txt
: 
: 
: so I need to translate all the paths in @filelist.txt for example in:
: 
: c:\MYDIRE~1\SUBDIR~1\LONGFI~1.TXT
: c:\MYDIRE~2\SUBDIR~2\LONGFI~1.TXT
: c:\FOOBAR\ONETWO~1.TXT

[snip]

: I'm on Windows 2000,

Very easy in Perl [UNTESTED CODE]:

#!perl -wi.bak
use strict;
use Win32;
while (<>) {
  chomp;
  print Win32::GetShortPathName($_),"\n";
}



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

Date: Tue, 22 Aug 2000 19:22:59 -0400
From: Omri Schwarz <ocschwar@mit.edu>
Subject: Re: Parse::Recdescent questions (<commit> and other problems.)
Message-Id: <39A30B53.9E87D5AB@mit.edu>

Damian Conway wrote:
> 
> Omri Schwarz <ocschwar@mit.edu> writes:
> 
>    > Actually, I meant:
> 
>    > operator_expression_1 :
>    >    (operator_expression_2 operator_1)(s?) operator_expression_2
> 
> Okay. In that case you *definitely* want to use <leftop:...> there (and
> everywhere else a similar pattern appears). That is:
> 
>         operator_expression_1 :
>                 <leftop: operator_expression_2 operator_1 operator_expression_2>

Do you mean

operator_expression_1 :
                <leftop: (operator_expression_2 operator_1)(s?)
operator_expression_2>

?


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

Date: 23 Aug 2000 00:16:40 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: Parse::Recdescent questions (<commit> and other problems.)
Message-Id: <8nv558$mdm$1@towncrier.cc.monash.edu.au>

Omri Schwarz <ocschwar@mit.edu> writes:

>> Okay. In that case you *definitely* want to use <leftop:...> there (and
>> everywhere else a similar pattern appears). That is:
>> 
>>         operator_expression_1 :
>>                 <leftop: operator_expression_2 operator_1 operator_expression_2>

>Do you mean

>operator_expression_1 :
>      <leftop: (operator_expression_2 operator_1)(s?) operator_expression_2>

No. I meant what I wrote. <leftop:...> takes care of the repetitions for you.

Damian


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

Date: Tue, 22 Aug 2000 20:19:20 -0400
From: Omri Schwarz <ocschwar@mit.edu>
Subject: Re: Parse::Recdescent questions (<commit> and other problems.)
Message-Id: <39A31888.8178DE05@mit.edu>

Damian Conway wrote:
> 
> Omri Schwarz <ocschwar@mit.edu> writes:
> 
> >> Okay. In that case you *definitely* want to use <leftop:...> there (and
> >> everywhere else a similar pattern appears). That is:
> >>
> >>         operator_expression_1 :
> >>                 <leftop: operator_expression_2 operator_1 operator_expression_2>
> 
> >Do you mean
> 
> >operator_expression_1 :
> >      <leftop: (operator_expression_2 operator_1)(s?) operator_expression_2>
> 
> No. I meant what I wrote. <leftop:...> takes care of the repetitions for you.


My mistake.


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

Date: Tue, 22 Aug 2000 20:30:51 -0400
From: Omri Schwarz <ocschwar@mit.edu>
Subject: Re: Parse::Recdescent questions (<commit> and other problems.)
Message-Id: <39A31B3B.57F62C04@mit.edu>

Omri Schwarz wrote:
> 
> Yes, but only in the rules that deal with CPP directives, and these
> don't
> get invoked in this sample.

Adding another <skip> to jump_statement solved that problem,
but that does indicate that in version 1.78, $skip is 
leaking from some rules to others.


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

Date: Tue, 22 Aug 2000 22:45:09 GMT
From: "Graham Chapman" <g.chapman0749@home.com>
Subject: Re: Perl + Administration of NT4
Message-Id: <VnDo5.98958$c5.2104771@news2.rdc1.on.home.com>

Try "Windows NT Workstation Configuration and Maintenance" by Matthew Lavy &
Ashley Meggit published by O'Reilly. I found this an excellent book about
managing NT workstations using Perl scripts.

Also, look at a white paper by Dave Roth at his site  :

http://www.roth.net/conference/lisant/1999/

This is another good idea in managing a network...

Hope these help...

Alessandro Augusto <Alessandro.Augusto@br.bosch.com> wrote in message
news:39A1C961.9237B20E@br.bosch.com...
> Hello,
>
> I am looking for tutorials, papers, articles or sites about how can
> I use perl to help administrate my NT network.
>
> Things that I would like to do:
> * remotely set values to the registry
> * remotely start/stop services
> * modify acls
> * etc
>
> I have been looking for this help, but Its has been hard to find.
> Can someone help me pointing me to the right direction.
>
> Thanks,
> Alessandro
>




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

Date: Tue, 22 Aug 2000 23:02:51 GMT
From: af778@iname.com
Subject: Perl/MySQL vs ASP/MS-SQL
Message-Id: <8nv0qg$lpm$1@nnrp1.deja.com>

Hello friends

I'm starting to work with MySQL in Perl. I came here to hear any
comment (good/bad) about the performance of that engine with perl.
I read time ago about a "battle" with MS stuff.... but I love Perl...
can somebody give me some comment?
Thank you

Claudio


--------------------------------------------------------------------
Registrá tu dominio .COM por solo $ 14.95 por año.
http://www.registrolibre.com


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 22 Aug 2000 16:51:56 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: Perl/MySQL vs ASP/MS-SQL
Message-Id: <39a3121c@news.victoria.tc.ca>

af778@iname.com wrote:
: Hello friends

: I'm starting to work with MySQL in Perl. I came here to hear any
: comment (good/bad) about the performance of that engine with perl.
: I read time ago about a "battle" with MS stuff.... but I love Perl...
: can somebody give me some comment?
: Thank you

I don't think Perl will much difference to the MySql speed.

MySql has been bench marked by other people, I think it usually rates very
well compared to other databases in terms of speed. 

However it gets its speed by ignoring issues such as transactions and
rollback capabilities.

If you need those capabilities then the speed doesn't bye you much.  On
the other hand if you use MySql to distribute your cooking clubs favourite
recipes then speed is probably more important than data integrity.


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

Date: Tue, 22 Aug 2000 18:02:14 -0700
From: stevel@bluetuna.com (Steve Leibel)
Subject: Re: Perl/MySQL vs ASP/MS-SQL
Message-Id: <stevel-2208001802140001@192.168.100.2>

In article <8nv0qg$lpm$1@nnrp1.deja.com>, af778@iname.com wrote:

> Hello friends
> 
> I'm starting to work with MySQL in Perl. I came here to hear any
> comment (good/bad) about the performance of that engine with perl.
> I read time ago about a "battle" with MS stuff.... but I love Perl...
> can somebody give me some comment?
> Thank you
> 


Software technology is full of religious battles.  C++ vs. Java; compiled
versus scripted; Perl vs. TCL vs Python; DCOM vs. CORBA.  It never ends. 
If your client/employer wants ASP, do that.  If they want Perl, do that. 
If they don't care but you do, talk them into Perl  and don't encourage
anyone to use the proprietary Microsoft technologies.  I assume that on
this newsgroup most will agree.  On the comp.do.whatever.microsoft.says
newsgroup, they'll vote for ASP.  

In any event mySQL sucks.  No subselects, no triggers, no transactions. 
Use Postgres.  There's another battle for you.

Steve L


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

Date: 22 Aug 2000 22:19:12 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: PLEASE HELP !!! What is wrong with Windows...
Message-Id: <8nuu90$dc0$9@slb3.atl.mindspring.net>

comet999 (comet999@my-deja.com) wrote:
: Hi,
: 
: I'm using the following code to dump the contents of a db ("cats.db")
: and running into problems. The code works just fine on Unix. But, when
: I try the same code on Windows NT the output is blank as if there were
: no records in the database. On unix this code prints 4 records.
: 
: I'm using ActivePerl on Windows NT.
: 
: Can someone shed some light please. Thanks.
: 
: ***********************************************************************
: use AnyDBM_File;
: 
: %cats = &readdatabase("h:\data\cats");

You're almost certainly not opening the file you think you are.  Pay a 
visit to the section of perlop that deals with quoting operators to find 
out how backslashes behave in double-quoted strings.



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

Date: Tue, 22 Aug 2000 20:58:22 -0400
From: "Jesús-Antonio Arroyo" <maldito@omnisky.net>
Subject: Re: procmail, perl and DBD::Oracle
Message-Id: <8nv7lh$p6v$1@news.xgate.co.kr>


Hash: SHA1

Did you try to put the full path of the file you are requiring in
mailprocess? Or perhaps the account mailprocess is running under
doesn't have access to the file you are requiring.


Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBOaMhrUwMMCksRqdSEQLCLwCfaviC1awRkGAV16e0HiMxZDRqyiIAoP8j
TF0dR7xgf6eKzZQYpDtqHgRw
=13Ev
-----END PGP SIGNATURE-----





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

Date: Tue, 22 Aug 2000 17:49:11 -0700
From: stevel@bluetuna.com (Steve Leibel)
Subject: Re: Programming Ethics
Message-Id: <stevel-2208001749390001@192.168.100.2>

In article <8nt1h3$8h4$2@slb0.atl.mindspring.net>, ebohlman@netcom.com
(Eric Bohlman) wrote:

> Keith Calvert Ivey (kcivey@cpcug.org) wrote:
> : Jason Maggard <jmaggard@va.mediaone.net> wrote:
> : >The ethics of this really are not your concern, as programmers, 
> : >we supply information and methods of dealing with it.
> : 
> : "Once ze rockets go up, who cares vhere zey come down?  Zat's
> : not my department, says Wernher von Braun."
> 


Credit where credit's due, isn't that a Tom Lehrer lyric?


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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


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