[13732] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1142 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 21 14:05:56 1999

Date: Thu, 21 Oct 1999 11:05:14 -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: <940529113-v9-i1142@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 21 Oct 1999     Volume: 9 Number: 1142

Today's topics:
    Re: Accessing Serial port <jtolley@bellatlantic.net>
    Re: Associative Array (Craig Berry)
    Re: At the risk of making myself an idiot ...How to cre (Michel Dalle)
    Re: At the risk of making myself an idiot ...How to cre (Craig Berry)
        Check whether a string is numeric, mixed or only charac <debot@xs4all.nl>
    Re: dereferencing complex expression (Craig Berry)
    Re: E-Mail via script Perl ? (Kragen Sitaker)
    Re: E-Mail via script Perl ? <flavell@mail.cern.ch>
        Expr or block as 1st param: Compiler magic needed? <jon@midnightbeach.com>
        Formatting 42 to $42.00 steveeq1@earthlink.net
        How can print a HTML file? <Jing.Shi@usa.alcatel.com>
    Re: Ignore the idiots (Greg Snow)
    Re: in need of example... (Brett W. McCoy)
    Re: in need of example... (Brett W. McCoy)
    Re: newbie problem writing/reading a file (Bill Moseley)
    Re: newbie problem writing/reading a file (Craig Berry)
        Perl and shadow passwords nate237@my-deja.com
        perl for win32 and date <Baby_Hawk@hotmail.com>
    Re: Perl parser / brackets in C language (Kragen Sitaker)
        Perl-coded website for sale - FloppyKiller.com <enaylor@my-deja.com>
    Re: subroutine (Brett W. McCoy)
    Re: what is SHTML ? (Brett W. McCoy)
        Where is the c.l.p.m charter? <msalter@bestweb.net>
    Re: Where is the c.l.p.m charter? <newsposter@cthulhu.demon.nl>
    Re: win32::odbc question (Michel Dalle)
    Re: Win98, PWS4, ActivePerl - Help with Paths (Brett W. McCoy)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 21 Oct 1999 17:59:07 GMT
From: James Tolley <jtolley@bellatlantic.net>
Subject: Re: Accessing Serial port
Message-Id: <380F53D9.EC7C5F53@bellatlantic.net>

stuckenbrock@my-deja.com wrote:

> Hi,
>
> is there any Perl-Module that demystifies the handling of the serial
> port?
> Didn't find anything on CPAN.

Win32::SerialPort
Win32API::CommPort
Win32::API

These should all be on CPAN, and there's an article in issue #13 of The
Perl Journal detailing their usage.

hth,

James





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

Date: Thu, 21 Oct 1999 17:15:21 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Associative Array
Message-Id: <s0uih99kr0189@corp.supernews.com>

A note on your subject line:  While 'associative array' used to be the
approved term for what you're using below, modern Perl useage calls it a
'hash'.  This term has several advantage, not least of which is a 7:1
reduction in syllable count. :)

Govindaraj (umungo01@shafika.vetri.com) wrote:
: I have Perl Script like below:
: 
: =====================================
: %Year = ( "Jan" => "One", "Feb" => "Two", "Mar" => "Three", "April" => 
: "Four" );

You actually need not quote the left-hand sides of the => operators above,
and it can often be easier on the eyes to format a hash assignment more
like this:

%Year = ( Jan   => 'One',
          Feb   => 'Two',
          Mar   => 'Three',
          April => 'Four' );

(By the way, I can't help noticing that your month-abbreviation pattern
seems to be a bit weird...shouldn't that last entry be 'Apr'?)

: while ( ($key, $value) = each ( %Year ) )
: {
:    print "Key   : $key\n";
:    print "Value : $value\n";
: }                                              
: 
: Output:
: =======
: Key   : April
: Value : Four
: Key   : Mar
: Value : Three
: Key   : Jan
: Value : One
: Key   : Feb
: Value : Two   
: 
: =====================================
: 
: Why I cannot get the Output in the order I have give in the
: Associative Array...why like this....not seems to be reverse order 

Not even quite reverse order (take another look at your output).  Hashes
have *no* useful or meaningful order; you should assume that any iterator
over the hash keys will encounter them in 'random' order.  If you need
ordering, there are several ways to do it.  For example:

  @months        = qw( Jan Feb Mar   April );
  @Year{@months} = qw( One Two Three Four  );

  foreach $month (@months) {
    print "Key   : $month\n",
          "Value : $Year{$month}\n";
  }

Here we use a separate array (which *does* maintain order) to hold the key
list, then a hash slice to map each month name to its number word.

: also...how the perl working on the Associate Array....kidding....!!!

It involves lots of energetic hamsters, a large ball of twine, and about a
fifth of vodka.  The vodka may be replaced with whiskey in 5.006.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Thu, 21 Oct 1999 17:16:33 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: At the risk of making myself an idiot ...How to create files in Perl ?
Message-Id: <7uni2s$2gl$1@news.mch.sbs.de>

In article <940523094.476101@news.vbs.at>, "paranoid" <genlabs@gmx.net> wrote:
>Hello geeks.

Hi newbie.

>Ì hope anyone of you can answer my question,
>and mildly ignore it's dumbness .

I'll try...

>I'm writing a subroutine that should do the following:
>1) Check if a filename is available (not  containing illegal chars etc., not
>already existing in the write directory)

"Not containing illegal chars" may be difficult, since each O.S. may have
other requirements, but see what's next.

"Not already existing" is simple : there is a file test (-e) to check whether 
a file exists or not.

How do you find it : start your "Online Documentation" in the ActivePerl
program folder, and look at 'perlfunc', which contains an explanation of
all Perl functions. The first function is '-X', and it describes all the file 
tests available.
If you're not working under Windoze, try 'perldoc perlfunc' to see the doc.

>2) Then Create the file

That's also easy. Use the 'open()' function that is also described in the
same documentation.

>The filename has to be variable (userdefined) , the extension stays fixed .

OK, Perl doesn't really care what filenames you use, so that's no problem.

But make sure that you test whether your open() succeeded, just in case
you have no access rights to that directory, or you use illegal characters,
etc.

>Since the only Perl Book I ever read was "Perl for Dummies" - which should
>explain why I'm posting here ;-),
>and there is nothing to cover this topic, I thought it would be not possible
>with Perl .
>Can you create files from a Perl script ? If the answer is yes, what's the
>command and syntax ?

Yes, it is. See above...

>Please help me if you can .
>
>Ethan C. Castaneda

HTH,

Michel.

P.S.: be sure to read the 'perlfaq' parts too, before you make a fool
of yourself by asking something that has already been answered
millions of times before... OTOH, if it's not clear, go ahead and tell us.


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

Date: Thu, 21 Oct 1999 17:41:27 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: At the risk of making myself an idiot ...How to create files in Perl ?
Message-Id: <s0uk275er0159@corp.supernews.com>

paranoid (genlabs@gmx.net) wrote:
: Ì hope anyone of you can answer my question,
: and mildly ignore it's dumbness .

If and only if you pledge never to place an apostrophe in possessive
'its', ever again, so long as you shall live.

: I'm writing a subroutine that should do the following:
: 1) Check if a filename is available (not  containing illegal chars etc., not
: already existing in the write directory)

The illegal-char check is a tough one; it's OS specific.  My suggested
approach would be to use -e (see perlop) to confirm that the file does not
exist, then simply attempt to open it with the user-supplied name and
check for success.  Note that you'll need to do flock-controlled
synchronization if multiple instances of your program may be running
simultaneously; there's a race condition between the -e check and the
attempt to open.

: 2) Then Create the file
: The filename has to be variable (userdefined) , the extension stays fixed .
: Since the only Perl Book I ever read was "Perl for Dummies" - which should
: explain why I'm posting here ;-),

So why haven't you fixed that?  The Llama is the universally recommended
perl-for-beginners book, and the Camel is the essential reference for all
of us.  You're doing yourself a grave disservice by trying to code using a
book which proudly proclaims that it considers you to be a dummy for
having bought it.

: and there is nothing to cover this topic, I thought it would be not possible
: with Perl .

Very little that is possible at all under a given OS is impossible in
Perl.

: Can you create files from a Perl script ? If the answer is yes, what's the
: command and syntax ?

perldoc -f open

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Thu, 21 Oct 1999 20:01:28 +0200
From: Frank de Bot <debot@xs4all.nl>
Subject: Check whether a string is numeric, mixed or only characters
Message-Id: <380F54F7.FAE6F459@xs4all.nl>

How can I Check whether a string is numeric, mixed or only characters?

I have this 3 string and I want this results:

34234 : numeric
a7c35 : mixed
asdfgh: only characters



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

Date: Thu, 21 Oct 1999 17:25:32 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: dereferencing complex expression
Message-Id: <s0uj4cdsr0137@corp.supernews.com>

Rich Ackerman (richmond@no.shadow.spam.net) wrote:
: I inherited some code with lots of references and I'm stumped on this
: one. Can anyone decode this for me? Given that
: 
: $cclog_results->[0]->{'authcode'} 
: 
: gives me the right thing, the value of an authorization code. This
: means (tell me if I'm wrong <g>) that $cclog_results is an array of
: references;

No, $cclog_results is a reference to an array...

: the first one points to a hash table in which 'authcode'
: is a key;

 ...the first element of which referenced array is itself a reference to a
hash...

: the whole expression returns the value at that key. Right?

 ...which referenced hash contains a key 'authcode', and the whole
expression returns the value associated with that key.

: Then $cclog_results is returned from the function along with another
: results hash, in this doozy:
: 
: my $results;
: %{$results->[0]} = (%{payment_results->[0]}, %{$cclog_results->[0]});
: return $results;

This is just creating the same kind of structure as above; $results is
made to be a reference to an anonymous array, the first (and only) element
of which is a reference to a hash.  The hash is populated by concatenating
severl other hashes obtained from similarly structured refs-to-arrays-of-
refs-to-hashes.  Oh, and you're missing a $ in front of 'payment_results'.

: and my question is how to get to my authcode using $results. I would
: think it would be:
: 
: $results->[1]->[0]->{'authcode'}

s/\Q->[1]\E// and you've got it.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Thu, 21 Oct 1999 17:15:42 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: E-Mail via script Perl ?
Message-Id: <2THP3.26021$E_1.1325697@typ11.nn.bcandid.com>

In article <380eec53$0$4048@reader1.casema.net>,
Mark Bakker <ceesbakk@casema.nl> wrote:
>Can you PLEASE repeat your questing in English???
>I think I know the answer, because I user email very much in perl scripts...
>But I dont understand french!

Can you PLEASE not flame people for not posting in English???

>Laurent-Andre Garnier - licence <garnier@ifsic.univ-rennes1.fr> schreef in
>berichtnieuws 380EDE66.BF927322@ifsic.univ-rennes1.fr...
>>
>>   Je cherche a envoyer un mail via un script perl sur un systeme unix.

"I'm trying to send a mail via a perl script on a Unix system."

>> La commande Unix "sendmail" doit repondre a cela mais je ne sais pas

"The Unix command "sendmail" will work for this, but I don't know"

>> comment l'uitiliser.

"how to use it."

>> Quel est le script minimum a ecrire ???

"Which is the minimum script to write?"

My french is bad, so I may have gotten some of that wrong.

There are the Mail:: modules.  Or:
#!/usr/bin/perl -w
use strict;
my $username = "kragen";
open MAIL, "|/usr/lib/sendmail -t" or die "Can't open sendmail: $!\n";
print MAIL <<eof;
From: nobody\@localhost
To: $username
Subject: test mail

Here is some text!
eof
close MAIL or die "Can't close sendmail: $!/$?\n";

J'espere que je vous ai aide.
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Oct 19 1999
21 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Thu, 21 Oct 1999 19:27:47 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: E-Mail via script Perl ?
Message-Id: <Pine.HPP.3.95a.991021192514.16523E-100000@hpplus01.cern.ch>


On Thu, 21 Oct 1999, Mark Bakker stood usenet on its head with all the
currently-popular bogosity indicators, and then trumped it by blurting
out:

> Can you PLEASE repeat your questing in English???

If you've got nothing constructive to add, shut up.

My own French is terrible, but there are enough here who can answer that
it needs no input from you _or_ me.

And you certainly need to study netiquette yourself before criticising
others.

tot ziens. perhaps.



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

Date: Thu, 21 Oct 1999 10:20:17 -0700
From: Jon Shemitz <jon@midnightbeach.com>
Subject: Expr or block as 1st param: Compiler magic needed?
Message-Id: <380F4B51.11E30191@midnightbeach.com>

I had a case where I wanted to check if a list contained a given value.

  grep /^$next$/, @thislist

worked fine, but as @thislist is potentially rather long, seemed like
overkill: I'd prefer an operator that stopped on the first match, and
returned a simple boolean scalar, rather than a list of all matches.

  sub anyExpr ($@) {
    my ($match, @list) = @_;
    die "\nFirst argument to anyExpr must be an expr\n" 
        if ref $match ne '';
    foreach (@list) { return 1 if m/$match/; }
    return 0;
  }

  sub anyBlock (&@) {
    my ($match, @list) = @_;
    die "\nFirst argument to anyBlock must be a block\n" 
        if ref $match ne 'CODE';
    foreach (@list) { return 1 if &$match; }
    return 0;
  }

were certainly straightford enough - but I'd like to have a single
function that can take an expr or a block, just like grep and map. I've
tried a few things (including, yes, reading the FAQ and using perldoc
-q), but I can't seem to do this.

Is it possible to do what I want, here? Or does this sort of overloading
rely on compiler magic?

-- 

http://www.midnightbeach.com    - Me, my work, my writing, and
http://www.midnightbeach.com/hs - my homeschool resource pages


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

Date: Thu, 21 Oct 1999 17:53:27 GMT
From: steveeq1@earthlink.net
Subject: Formatting 42 to $42.00
Message-Id: <7unjum$cji$1@nnrp1.deja.com>

I searched a few books and couldn't find info on this one. Does anyone
know how to format numbers in Perl to a specific format? I used to use
the "format" command in Visual Basic, but I don't know how to do it in
Perl. Basically, I need:

42

to become

$42.00

or 42.1

to

$42.10

I assume there is a module or something that makes life easy on me.

- Steve

--

-------------------------------------------
If you want to send me an email, send it to:
steve{at_sign}tripperjones{dot_com}


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


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

Date: Thu, 21 Oct 1999 13:46:28 -0400
From: Jing Shi <Jing.Shi@usa.alcatel.com>
Subject: How can print a HTML file?
Message-Id: <380F5174.FEC85BF@usa.alcatel.com>

How can I write a Perl program to print out (from the printer) a HTML
file without open the Netscape (or other browser)?

Thanks




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

Date: 21 Oct 1999 16:48:39 GMT
From: snow@statsci.com (Greg Snow)
Subject: Re: Ignore the idiots
Message-Id: <7ung57$kg5$1@junior.statsci.com>

In article <XZoP3.757$LR3.132822@news.shore.net>,
Scratchie  <AgitatorsBand@yahoo.com> wrote:
>Greg Snow <snow@statsci.com> wrote:
>:>This is comp.lang.perl.misc right? Maybe there should be a
>:>comp.lang.perl.peoplewhoknowitallalready so that us newbies don't feel
>:>like we're encroaching on the elitists' turf.
>
>: This has been suggested before, but think about it for a minute, if there
>: were a newbies group and an experts group and you had a question that you
>: thought was important, would you go to the newbies group where the only
>: people who would answer the question might know less than you
>
>That's not a valid assumption. 

What does the validity of the assumption have to do with anything?  If
enough newbies make the assumption (requardless of it's validity), they
will still be bothering the experts group.  (see Randal's reply to my
previous post for empirical support).

>There might be experts, or people of
>moderate knowledge, who don't find it morally repellant to answer newbies'
>stupid questions. Therefore, it is not logical to assume that there will
>only be newbies on the newbie group.

My concern is not with the experts in the newbies group, but with the
newbies in the experts group.

>
>OTOH, there are probably a lot of newbie questions ("Why am I getting a
>server error when I run my CGI script?") that *could* be answered
>accurately by newbies or recent newbies.

And when the newbies asked FAQ's, what would happen?  would the recent
newbies refer them to the FAQ making the new group no different than the
current one.  Or would the recent newbies give answers that have not gone
through the refinement process that the FAQ has and thereby make the
newsgroup a less reliable source of help?

>
>In either case, there might be plenty of value in the newbies' group.

But would there be any value in the experts group?  shouldn't both sides
benifit?



-- 
-------------------------------------------------------------------------------
     Gregory L. Snow         |  Inertia makes the world go round,
     (Greg)                  |   Love makes the trip worth taking.
     snow@statsci.com        |


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

Date: Thu, 21 Oct 1999 17:44:03 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: in need of example...
Message-Id: <slrn80ukfm.llb.bmccoy@moebius.foiservices.com>

Also Sprach Larry Rosler <lr@hpl.hp.com>:

>In article <slrn80u5p2.llb.bmccoy@moebius.foiservices.com> on Thu, 21 
>Oct 1999 13:33:03 GMT, Brett W. McCoy <bmccoy@foiservices.com> says...
>
>As Tom Christiansen isn't around to grumble about this, I'll try 
>instead.  Someone ought to.
>
>Please, someone, please give me one (1) reason why this code is better 
>than using, e.g.:
>
>{
>    local *DIRHANDLE;
>    opendir DIRHANDLE, ...
>    ... readdir DIRHANDLE ...
>}
>
>Just one reason.  Please?

Didn't say it was better.  I came into Perl from C++ and Java, so I just
naturally fall into the object thing.  

-- 
Brett W. McCoy                             bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek)   http://www.foiservices.com
FOI Services, Inc./DIOGENES                301-975-0110
---------------------------------------------------------------------------


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

Date: Thu, 21 Oct 1999 17:46:59 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: in need of example...
Message-Id: <slrn80ukl6.llb.bmccoy@moebius.foiservices.com>

Also Sprach Scratchie <AgitatorsBand@yahoo.com>:
>Erik van Roode <newsposter@cthulhu.demon.nl> wrote:
>:> Can anyone send me in the direction of a good example of listing and sorting
>:> directories under Linux? I need to have a way to sort out .gif's and .jpg's
>:> into an array and then output the list into HTML. I have the HTML part done,
>:> but how do I do an 'ls' into an array so that I can sort it? So far all I
>:> have done is wear out my harddrive and gotten frustrated! :)
>
>: Check out the opendir, the grep, and the sort functions.
>
>Or just try 
>
> my @graphics = `ls *.jpg *.gif`;

For the benefit of writing portable (and secure) code, using the Perl
supplied functions (or modules, if your an OOP geek :-) ) is safer.  What
if they don't have ls on their system?

-- 
Brett W. McCoy                             bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek)   http://www.foiservices.com
FOI Services, Inc./DIOGENES                301-975-0110
---------------------------------------------------------------------------


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

Date: Thu, 21 Oct 1999 10:05:35 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: newbie problem writing/reading a file
Message-Id: <MPG.1278e7b6cb546b1398981b@nntp1.ba.best.com>

Rik Driever (Rik@fast-speed.demon.nl) seems to say...

General comments:
#!/usr/local/bin/perl -w
use strict;

will save you time.

Also, check errors on your open()s




> OK I will:
> 
> #!/usr/local/bin/perl
> #This code is for appending the values to the file 
> $file = 'score.txt';            
> open(MYFILE, >>$file);
              ^^-- this doesn't compilie.




> print MYFILE "This line goes to the file.\n";
> #Here should be the code to add a value from a form to the file...
> #Probably something like:   print MYFILE "@formvalue";
> close(MYFILE);          

You want to read from a CGI form, and save the values?  My advice still 
is:

perldoc CGI

It's explained a lot better there than I can explain it.

This looks ok, but for a few things.  Frankly, I would just have one 
script that does both functions -- reading and displaying.  See CGI.pm 
documentation.
> 
> #!/usr/local/bin/perl
> #With this code I'm trying to show the values from the text file
> #in html 
> $file = 'score.txt';
> open(MYFILE, $file);
> @lines = <MYFILE>;
> close(MYFILE);
> print "Content-Type: text/html\n\n";
> print "<HTML><BODY>";
> print "<H1>Results</H1>";
> print "<p>";
> print "@lines";
What do you have $" set as?



-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: Thu, 21 Oct 1999 17:18:38 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: newbie problem writing/reading a file
Message-Id: <s0uine5gr0160@corp.supernews.com>

Rik Driever (Rik@fast-speed.demon.nl) wrote:
: OK I will:
: 
: #!/usr/local/bin/perl

No -w?  No use strict?

: #This code is for appending the values to the file 
: $file = 'score.txt';            
: open(MYFILE, >>$file);          

That doesn't even compile!  You're cheating.  Show us your *real* code.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--  http://www.cinenet.net/users/cberry/home.html
   |   "They do not preach that their God will rouse them
      a little before the nuts work loose." - Kipling


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

Date: Thu, 21 Oct 1999 17:31:30 GMT
From: nate237@my-deja.com
Subject: Perl and shadow passwords
Message-Id: <7unilj$bm4$1@nnrp1.deja.com>

I am attempting to create a process to add new users to Solaris and
Linux boxes via Perl.  I couldn't find a module that would do this
(with shadow passwords), so I've started on writing something myself.

I'm having trouble with encrypting the password to put into the shadow
file.  Crypt would work fine, except all of the boxes that this will
run on use MD5 (I think, the crypt password I tested with doesn't
match).  Does anyone have an example of what module and/or syntax to
use to encrypt a password with MD5 into a format suitable for the
shadow file?

Thanks in advance,
Nathan Nichols


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


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

Date: Thu, 21 Oct 1999 17:38:59 GMT
From: BabyHawk <Baby_Hawk@hotmail.com>
Subject: perl for win32 and date
Message-Id: <7unj3j$c1m$1@nnrp1.deja.com>

Hi people...

within a perl script under winNT and activestate perl i want to
determine to which number of week (1...52) the day before belongs to.
How can that be done?


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


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

Date: Thu, 21 Oct 1999 17:09:04 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Perl parser / brackets in C language
Message-Id: <QMHP3.26013$E_1.1382585@typ11.nn.bcandid.com>

In article <7umcco$fih$1@nnrp1.deja.com>,  <sintes@my-deja.com> wrote:
>In article <%VHO3.14408$E_1.848528@typ11.nn.bcandid.com>,
>  kragen@dnaco.net (Kragen Sitaker) wrote:
>> You might be able to get away with a half-assed implementation if you
>> run the C code through "indent" first.  (Assuming "indent" understands
>> your code correctly; it may not.)
>
>I think that indent do not have option that allows to add bracket.

It doesn't.  But parsing "indent" output might be easier than parsing
arbitrary C code.  YMMV, I haven't tried it.

>I thought about using PCCTS with modifying the  grammar of C language
>but it is too complex for this kind of operation.

What's PCCTS?
-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Oct 19 1999
21 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Thu, 21 Oct 1999 10:11:28 -0700
From: "Ernie" <enaylor@my-deja.com>
Subject: Perl-coded website for sale - FloppyKiller.com
Message-Id: <380f49b1$0$15717@fountain.mindlink.net>

http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=185688383




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

Date: Thu, 21 Oct 1999 17:48:48 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: subroutine
Message-Id: <slrn80ukoj.llb.bmccoy@moebius.foiservices.com>

Also Sprach rancorr@hotmail.com <rancorr@hotmail.com>:

>how do i get a subroutine to return a string?  the result i get from
>the subroutine is always a scalar.

A string is a scalar, not an array like it is in C.

-- 
Brett W. McCoy                             bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek)   http://www.foiservices.com
FOI Services, Inc./DIOGENES                301-975-0110
---------------------------------------------------------------------------


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

Date: Thu, 21 Oct 1999 17:51:10 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: what is SHTML ?
Message-Id: <slrn80ukt1.llb.bmccoy@moebius.foiservices.com>

Also Sprach Graham W. Boyes <me@toao.net>:

>How about this:
>Comp.lang.perl.newbie.newbie.newbie.newbie.newbie?!
>
>Look, strange as it may seem, some of us *aren't* experts in Perl!  We
>are learning the language and we find it difficult!  If you folks
>who *are* experts can't handle answering simple questions, then *DON'T!*

The point is, many of the simple questions have already been answered in
the FAQs and PODs.  Why the need to keep re-inventing the wheel?

-- 
Brett W. McCoy                             bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek)   http://www.foiservices.com
FOI Services, Inc./DIOGENES                301-975-0110
---------------------------------------------------------------------------


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

Date: Thu, 21 Oct 1999 17:35:17 GMT
From: Mike Salter <msalter@bestweb.net>
Subject: Where is the c.l.p.m charter?
Message-Id: <Pine.BSF.4.05.9910211316520.11058-100000@monet.bestweb.net>

<2 cents>
Rather than continue the "Ignore the idiots" thread, I thought I might
start with the above question.  I searched for the charter, but couldn't
locate it.  Perhaps someone could post it here, and from there continue a
discussion based that.

Since this is an unmoderated group, it might help if guidelines for this
group, as well as url's to FAQs and other sites were posted once a month
for users new to this group.
</2 cents>

Mike




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

Date: 21 Oct 1999 17:49:27 GMT
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: Where is the c.l.p.m charter?
Message-Id: <7unjn7$h8c$1@internal-news.uu.net>

Mike Salter <msalter@bestweb.net> wrote:

> Since this is an unmoderated group, it might help if guidelines for this
> group, as well as url's to FAQs and other sites were posted once a month
> for users new to this group.

Like this?

*** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***

Erik



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

Date: Thu, 21 Oct 1999 17:28:18 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: win32::odbc question
Message-Id: <7uniot$2gl$2@news.mch.sbs.de>

In article <380F3F63.A6540173@telecom.pt>, "João Sil" <joao.f.sil@telecom.pt> wrote:
>I 'm using win32::odbc to connect to an rdb database and I need to know
>if there is a way to query the module in such a way that it tells me the
>number of rows retrieved from a select.
>I used $db->RowCount() but it returns -1.
>
>Is it possible to instruct FetchRow to start at a specified index istead
>of having to run through all the record set?

Have a look at the documentation that goes with Win32::ODBC.
Seems to me your two questions are answered there already...

Of course, you may still need to find another ODBC driver for rdb,
but that has nothing to do with Perl :-)

Michel.


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

Date: Thu, 21 Oct 1999 17:54:58 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: Win98, PWS4, ActivePerl - Help with Paths
Message-Id: <slrn80ul46.llb.bmccoy@moebius.foiservices.com>

Also Sprach Tyler M. <uttyler@hotmail.com>:

>I know I should be looking harder for the answer, and I am sure this proves
>I am new to Perl.

This is a web server issue, not a perl issue.  I bet you don't have your
cgi alias set up correctly (asusming PWS uses aliases).  I think you
should be looking harder for your answer in the PWS documentation.

-- 
Brett W. McCoy                             bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek)   http://www.foiservices.com
FOI Services, Inc./DIOGENES                301-975-0110
---------------------------------------------------------------------------


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

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


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