[12616] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 25 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 6 20:47:14 1999

Date: Tue, 6 Jul 1999 17:36:43 -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           Tue, 6 Jul 1999     Volume: 9 Number: 25

Today's topics:
    Re: Date::Manip can't handle Arizona Time zone? <nolanj00@mh.us.sbphrd.com>
    Re: Date::Manip can't handle Arizona Time zone? <kgentes@worshipmusic.com>
    Re: Date::Manip can't handle Arizona Time zone? (William Herrera)
    Re: Date::Manip can't handle Arizona Time zone? (Abigail)
    Re: Date::Manip can't handle Arizona Time zone? (I R A Aggie)
    Re: Date::Manip can't handle Arizona Time zone? (Abigail)
    Re: Date::Manip can't handle Arizona Time zone? <cassell@mail.cor.epa.gov>
    Re: Date::Manip can't handle Arizona Time zone? kgentes@my-deja.com
    Re: David J Pimlott/GB/ITEC/ICI is out of the office. (Ronald J Kimball)
        DB tutorials <magnuson@bcs.rochester.edu>
    Re: DB tutorials <gellyfish@gellyfish.com>
    Re: DB tutorials <elaine@wustl.edu>
    Re: DB tutorials <Webdesigner@NewWebSite.com>
        DBI:Postgresql in Apache? <nospam@nospam.nospam>
    Re: DBI:Postgresql in Apache? <gellyfish@gellyfish.com>
    Re: DBI:Postgresql in Apache? <swiftkid@bigfoot.com>
    Re: DBI:Postgresql in Apache? <swiftkid@bigfoot.com>
    Re: difficulty in reading a directory (Jason Q.)
    Re: difficulty in reading a directory (Andrew Allen)
        Distribution <streaking_pyro@my-deja.com>
    Re: Distribution <swiftkid@bigfoot.com>
        Downloading A C EXE file, nerilius@my-deja.com
    Re: Downloading A C EXE file, (Abigail)
    Re: Downloading A C EXE file, <swiftkid@bigfoot.com>
        Downloading Alterations nerilius@my-deja.com
    Re: Downloading Alterations <swiftkid@bigfoot.com>
    Re: Downloading Alterations (Abigail)
        Employment Opportunity - Transportation www@OpsResearch.com
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Fri, 02 Jul 1999 19:14:56 -0400
From: John Nolan <nolanj00@mh.us.sbphrd.com>
Subject: Re: Date::Manip can't handle Arizona Time zone?
Message-Id: <377D47F0.7D71E1CB@mh.us.sbphrd.com>

kgentes@gentek.net wrote:
>   I was trying to use the Date::Manip module and the
>   first invocation of its methods bombed out my Perl
>   module.  I looked through the error and it looks to
>   me like the Date::Manip package doesn't understand
>   the Arizona timezone (Arizona has its own time zone,
>   in case you all didn't know- it never changes to DST


Hmm. It's quite possible that the developers/maintainers
of Date::Manip were not aware of the Arizona time zone.   
They might appreciate a friendly email message asking this question. 
(OTOH, given the wide range of things that Date::Manip can do,
I wouldn't be surprised if it could handle it after all.)  

I have Date::Manip ver. 5.34, and below is the list 
of time zones included in it.  Doesn't look like 
it has any Arizona time zone. 


[Snippet from Date::Manip]

    #  variables for time zones
    #    $ZoneExp     : regular expression
    #    %Zone        : all parsable zones with their translation
    #    $Zone        : the current time zone
    #    $CurrZoneExp : "(us/eastern|us/central)"
    #    %CurrZone    : ("us/eastern","est7edt","us/central","cst6cdt")
    $zonesrfc=
      "idlw   -1200 ".  # International Date Line West
      "nt     -1100 ".  # Nome
      "hst    -1000 ".  # Hawaii Standard
      "cat    -1000 ".  # Central Alaska
      "ahst   -1000 ".  # Alaska-Hawaii Standard
      "yst    -0900 ".  # Yukon Standard
      "hdt    -0900 ".  # Hawaii Daylight
      "ydt    -0800 ".  # Yukon Daylight
      "pst    -0800 ".  # Pacific Standard
      "pdt    -0700 ".  # Pacific Daylight
      "mst    -0700 ".  # Mountain Standard
      "mdt    -0600 ".  # Mountain Daylight
      "cst    -0600 ".  # Central Standard
      "cdt    -0500 ".  # Central Daylight
      "est    -0500 ".  # Eastern Standard
      "sat    -0400 ".  # Chile
      "edt    -0400 ".  # Eastern Daylight
      "ast    -0400 ".  # Atlantic Standard
      #"nst   -0330 ".  # Newfoundland Standard      nst=North
Sumatra    +0630
      "nft    -0330 ".  # Newfoundland
      #"gst   -0300 ".  # Greenland Standard         gst=Guam
Standard    +1000
      #"bst   -0300 ".  # Brazil Standard            bst=British
Summer   +0100
      "adt    -0300 ".  # Atlantic Daylight
      "ndt    -0230 ".  # Newfoundland Daylight
      "at     -0200 ".  # Azores
      "wat    -0100 ".  # West Africa
      "gmt    +0000 ".  # Greenwich Mean
      "ut     +0000 ".  # Universal
      "utc    +0000 ".  # Universal (Coordinated)
      "wet    +0000 ".  # Western European
      "cet    +0100 ".  # Central European
      "fwt    +0100 ".  # French Winter
      "met    +0100 ".  # Middle European
      "mewt   +0100 ".  # Middle European Winter
      "swt    +0100 ".  # Swedish Winter
      "bst    +0100 ".  # British Summer             bst=Brazil
standard  -0300
      "gb     +0100 ".  # GMT with daylight savings
      "eet    +0200 ".  # Eastern Europe, USSR Zone 1
      "cest   +0200 ".  # Central European Summer
      "fst    +0200 ".  # French Summer
      "mest   +0200 ".  # Middle European Summer
      "metdst +0200 ".  # An alias for mest used by HP-UX
      "sst    +0200 ".  # Swedish Summer             sst=South
Sumatra    +0700
      "bt     +0300 ".  # Baghdad, USSR Zone 2
      "eest   +0300 ".  # Eastern Europe Summer
      "eetedt +0300 ".  # Eastern Europe, USSR Zone 1
      "it     +0330 ".  # Iran
      "zp4    +0400 ".  # USSR Zone 3
      "zp5    +0500 ".  # USSR Zone 4
      "ist    +0530 ".  # Indian Standard
      "zp6    +0600 ".  # USSR Zone 5
      "nst    +0630 ".  # North Sumatra              nst=Newfoundland
Std -0330
      #"sst   +0700 ".  # South Sumatra, USSR Zone 6 sst=Swedish
Summer   +0200
      "hkt    +0800 ".  # Hong Kong
      "sgt    +0800 ".  # Singapore
      "cct    +0800 ".  # China Coast, USSR Zone 7
      "awst   +0800 ".  # West Australian Standard
      "wst    +0800 ".  # West Australian Standard
      "kst    +0900 ".  # Republic of Korea
      "jst    +0900 ".  # Japan Standard, USSR Zone 8
      "rok    +0900 ".  # Republic of Korea
      "cast   +0930 ".  # Central Australian Standard
      "east   +1000 ".  # Eastern Australian Standard
      "gst    +1000 ".  # Guam Standard, USSR Zone 9 gst=Greenland
Std    -0300
      "cadt   +1030 ".  # Central Australian Daylight
      "eadt   +1100 ".  # Eastern Australian Daylight
      "idle   +1200 ".  # International Date Line East
      "nzst   +1200 ".  # New Zealand Standard
      "nzt    +1200 ".  # New Zealand
      "nzdt   +1300 ".  # New Zealand Daylight
      "z +0000 ".
      "a -0100 b -0200 c -0300 d -0400 e -0500 f -0600 g -0700 h -0800
".
      "i -0900 k -1000 l -1100 m -1200 ".
      "n +0100 o +0200 p +0300 q +0400 r +0500 s +0600 t +0700 u +0800
".
      "v +0900 w +1000 x +1100 y +1200";
    ($ZoneExp,%Zone)=
      &Date_Regexp($zonesrfc,"sort,lc,under,back",
                   "keys");


-- 
John Nolan
nolanj00 mh.us.sbphrd.com


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

Date: Sat, 03 Jul 1999 05:50:43 GMT
From: "Kim Gentes" <kgentes@worshipmusic.com>
Subject: Re: Date::Manip can't handle Arizona Time zone?
Message-Id: <Twhf3.50814$Fz2.7598@news.rdc1.az.home.com>

James,

well, what can I say James.. my extent of "timezone" knowledge is limited to
the list that my time/date calendar shows on my PC... :)

if you have Microsoft stuff, there is a entry for [GMT-07:00] identified as
Arizona....

another tab of that same application however lists the "current time zone"
as "US mountain Standard Time".

so the bottom line is- I don't much care what time I am in- I just want
my PC to work with Date::Manip in a Perl module...

can anyone help me with that ?!?!!?!?!?!?

PLEASE>>>>>>>>>>>

if I can't find an answer to using "ParseDate" , I will be forced to
use VB [a shreek is heard across the e-scape...]

thanks anyways..

Kim

I R A Aggie <fl_aggie@thepentagon.com> wrote in message
news:slrn7nqgha.7qs.fl_aggie@thepentagon.com...
> On 2 Jul 1999 18:46:53 GMT, I R A Aggie <fl_aggie@thepentagon.com>, in
[snippee]
>
> Being consumed by all things time-related, I went to the canonical
> US Time Authority - the US Naval Observatory. As I suspected, there
> *is* no Arizona timezone.
>
[snipper]
>
> So there's no reason for Date::Manip to handle Arizona Standard Time... :)
>
> James




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

Date: Sat, 03 Jul 1999 06:34:54 GMT
From: posting.account@lynxview.com (William Herrera)
Subject: Re: Date::Manip can't handle Arizona Time zone?
Message-Id: <377dae6c.144222483@news.rmi.net>

On Sat, 03 Jul 1999 05:50:43 GMT, "Kim Gentes"
<kgentes@worshipmusic.com> wrote:

>well, what can I say James.. my extent of "timezone" knowledge is limited to
>the list that my time/date calendar shows on my PC... :)
>so the bottom line is- I don't much care what time I am in- I just want
>my PC to work with Date::Manip in a Perl module...

Try putting a
SET TZ=MST7
or whatever Arizona is, wherever you set your environmet variables.
Maybe Date::Manip will use TZ.


---
The above from: address is spamblocked. Use wherrera (at) lynxview (dot) com for the reply address.


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

Date: 3 Jul 1999 04:43:45 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Date::Manip can't handle Arizona Time zone?
Message-Id: <slrn7nrmpv.31h.abigail@alexandra.delanet.com>

John Nolan (nolanj00@mh.us.sbphrd.com) wrote on MMCXXXI September
MCMXCIII in <URL:news:377D47F0.7D71E1CB@mh.us.sbphrd.com>:
&& 
&& [Snippet from Date::Manip]
&& 
&&     #  variables for time zones
&&     #    $ZoneExp     : regular expression
&&     #    %Zone        : all parsable zones with their translation
&&     #    $Zone        : the current time zone
&&     #    $CurrZoneExp : "(us/eastern|us/central)"
&&     #    %CurrZone    : ("us/eastern","est7edt","us/central","cst6cdt")
&&     $zonesrfc=
&&       "pst    -0800 ".  # Pacific Standard
&&       "pdt    -0700 ".  # Pacific Daylight
&&       "mst    -0700 ".  # Mountain Standard
&&       "mdt    -0600 ".  # Mountain Daylight
&&       "cst    -0600 ".  # Central Standard
&&       "cdt    -0500 ".  # Central Daylight
&&       "est    -0500 ".  # Eastern Standard
&&       "edt    -0400 ".  # Eastern Daylight


Does that mean people in the US actually have to change their timezone
(file)s twice a year? (Or at least those not from Arizona or certain
parts of Illinios).



Abigail
-- 
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'


  -----------== 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: 3 Jul 1999 15:43:30 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Date::Manip can't handle Arizona Time zone?
Message-Id: <slrn7nsc1e.aff.fl_aggie@thepentagon.com>

On 3 Jul 1999 04:43:45 -0500, Abigail <abigail@delanet.com>, in
<slrn7nrmpv.31h.abigail@alexandra.delanet.com> wrote:

+ Does that mean people in the US actually have to change their timezone
+ (file)s twice a year?

Umm, no...usually a TZ file looks like 'EST5EDT', so it has both sides
covered. But you knew that?

+ (Or at least those not from Arizona or certain parts of Illinios).

Indiana, actually. Both Children of the Corn, tho...so the confusion is
a given...

James


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

Date: 3 Jul 1999 16:07:20 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Date::Manip can't handle Arizona Time zone?
Message-Id: <slrn7nsuri.31h.abigail@alexandra.delanet.com>

I R A Aggie (fl_aggie@thepentagon.com) wrote on MMCXXXII September
MCMXCIII in <URL:news:slrn7nsc1e.aff.fl_aggie@thepentagon.com>:
&& On 3 Jul 1999 04:43:45 -0500, Abigail <abigail@delanet.com>, in
&& <slrn7nrmpv.31h.abigail@alexandra.delanet.com> wrote:
&& 
&& + Does that mean people in the US actually have to change their timezone
&& + (file)s twice a year?
&& 
&& Umm, no...usually a TZ file looks like 'EST5EDT', so it has both sides
&& covered. But you knew that?


No. I'm used to have a TZ file called 'MET', that just does the right
thing.



Abigail
-- 
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'


  -----------== 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: Sat, 03 Jul 1999 14:25:09 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Date::Manip can't handle Arizona Time zone?
Message-Id: <377E7FB5.F87FA204@mail.cor.epa.gov>

Abigail wrote:
> [snip]
> Does that mean people in the US actually have to change their timezone
> (file)s twice a year? (Or at least those not from Arizona or certain
> parts of Illinios).

It's worse than that.  The new Federal Office of Opprobrious
Timezones (FOOT) has mandated that all timezones be changed
monthly, and that Arizona and Indiana (I knew you meant that
instead of Illinois) have to change theirs weekly.  So the
government has really put its FOOT in it.

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


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

Date: Tue, 06 Jul 1999 14:28:59 GMT
From: kgentes@my-deja.com
Subject: Re: Date::Manip can't handle Arizona Time zone?
Message-Id: <7lt3qr$fd1$1@nnrp1.deja.com>

I tried setting an environment variable as you suggest
below, and no luck...

are there ANY other Perl programmers in Arizona?!?!!!
I can't be the first person to ever run into this
problem... I am baffoogled... PLEASE if anyone know how
to get the Date::Manip module working in Arizona,
I beg you to send me some helpful advise...

crying in my Date::Manip soup,

Kim Gentes


In article <377dae6c.144222483@news.rmi.net>,
  posting.account@lynxview.com (William Herrera) wrote:
> On Sat, 03 Jul 1999 05:50:43 GMT, "Kim Gentes"
> <kgentes@worshipmusic.com> wrote:
>
> Try putting a
> SET TZ=MST7
> or whatever Arizona is, wherever you set your environmet variables.
> Maybe Date::Manip will use TZ.
>


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


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

Date: Sun, 4 Jul 1999 11:41:48 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: David J Pimlott/GB/ITEC/ICI is out of the office.
Message-Id: <1duezx6.s70rt51z0v59fN@p215.tc2.state.ma.tiac.com>

Filip M. Gieszczykiewicz <fmgst+@pitt.edu> wrote:

> abigail@delanet.com soliloquized:
> [snip]
> >perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>

> Dies with:
> Bad name after lwe:: at p.pl line 1.

You do realize that you're supposed to run that from a command prompt,
don't you?

-lwe are command-line switches to perl, not part of the Perl code.

-- 
#!/usr/bin/sh -- chipmunk (aka Ronald J Kimball)
      perl -e'for(sort keys%main::){print if $$_ eq 1}
            ' -s  -- -' Just' -' another ' -'Perl ' -'hacker 
' http://www.tiac.net/users/chipmunk/ [rjk@linguist.dartmouth.edu]


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

Date: Sat, 3 Jul 1999 18:11:24 -0400
From: James Magnuson <magnuson@bcs.rochester.edu>
Subject: DB tutorials
Message-Id: <Pine.SUN.3.96.990703180841.4152A-100000@broca.bcs.rochester.edu>

Does anyone know of a tutorial introduction to using the various DB
modules for perl?  The coverage I've seen in perl books tends to be
too sketchy for a newbie like me to figure out.

Thanks,

jim




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

Date: 4 Jul 1999 14:00:09 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: DB tutorials
Message-Id: <7lnpd9$3ub$1@gellyfish.btinternet.com>

On Sat, 3 Jul 1999 18:11:24 -0400 James Magnuson wrote:
> Does anyone know of a tutorial introduction to using the various DB
> modules for perl?  The coverage I've seen in perl books tends to be
> too sketchy for a newbie like me to figure out.
> 

I found the DB_File manpage a rather good introduction.

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


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

Date: Sat, 3 Jul 1999 19:51:17 -0500
From: elaine ashton <elaine@wustl.edu>
Subject: Re: DB tutorials
Message-Id: <Pine.GSO.4.05.9907031945240.454-100000@chaos.wustl.edu>

> Does anyone know of a tutorial introduction to using the various DB
> modules for perl?  The coverage I've seen in perl books tends to be
> too sketchy for a newbie like me to figure out.

If you are using mySQL, the manual included with the source is very good.
Also, O'Reilly is publishing a mSQL/mySQL book shortly. 

http://www.symbolstone.org/technology/perl/DBI/index.html
or
http://reference.perl.com/query.cgi?section=database

are great on-line resources.

I am always amazed that people will spend the time to post here before
trying even the most simple of starting points which should be obvious. If
this is really not obvious, please tell us how we might make it moreso. I
ask this in a very earnest tone.

e.
-- 

         -=]) elaine ashton // elaine@chaos.wustl.edu // HFB ([=-
   -=]) A dismal wasteland of banality, cliche' and casual obscenity ([=- 



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

Date: Mon, 05 Jul 1999 18:39:31 GMT
From: Floyd Morrissette <Webdesigner@NewWebSite.com>
Subject: Re: DB tutorials
Message-Id: <7lqu52$pdv$1@nnrp1.deja.com>

Sometimes we have no idea where to start and that is why we ask people
who should know the best place to start. We could ask one person we
might happen to know locally. But I always thought it would best to ask
perhaps hundreds of people to get different ideas.

I know I am going to get a bad rep here but I would like to state that I
thought newsgroups were a place especially for beginners to ask some
pros questions. I am beginning to see that the pros resent beginners
being here. Apparently the group is only for real programmers to talk
about how great they are and to tell the newbies to go look somewhere
else.

It seems the answer for all questions could be "go read the docs or
faqs" for I find it hard to believe that there are many questions that
are not covered somewhere. So I guess nobody should ask a question here
since everything is already covered and nobody wants to help. I find it
very hard to ask some documentation a question and its even harder to
ask a question here without getting blasted. If you can't say anything
nice, don't say anything at all.



In article <Pine.GSO.4.05.9907031945240.454-100000@chaos.wustl.edu>,
  elaine ashton <elaine@wustl.edu> wrote:
> > Does anyone know of a tutorial introduction to using the various DB
> > modules for perl?  The coverage I've seen in perl books tends to be
> > too sketchy for a newbie like me to figure out.
>
> If you are using mySQL, the manual included with the source is very
good.
> Also, O'Reilly is publishing a mSQL/mySQL book shortly.
>
> http://www.symbolstone.org/technology/perl/DBI/index.html
> or
> http://reference.perl.com/query.cgi?section=database
>
> are great on-line resources.
>
> I am always amazed that people will spend the time to post here before
> trying even the most simple of starting points which should be
obvious. If
> this is really not obvious, please tell us how we might make it
moreso. I
> ask this in a very earnest tone.
>
> e.
> --
>
>          -=]) elaine ashton // elaine@chaos.wustl.edu // HFB ([=-
>    -=]) A dismal wasteland of banality, cliche' and casual obscenity
([=-
>
>

--
Get your web site from http://www.NewWebSite.com
Consultation is always free.
Help with cgi scripts.


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


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

Date: Tue, 6 Jul 1999 15:10:31 +0800
From: "Calvin" <nospam@nospam.nospam>
Subject: DBI:Postgresql in Apache?
Message-Id: <7lsa14$anr$1@hfc.pacific.net.hk>

Hi,
    My server is using perl5, postgresql and apache1.3.

    Is that all modules that can be used in my perl intepreter can also be
use when i am writing CGI?? Also, where can i download the DBI to postgresql
modules from the net??
Thanks

--
Best regards
Calvin
http://www.geocities.com/SiliconValley/Code/9129/




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

Date: 6 Jul 1999 09:26:19 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: DBI:Postgresql in Apache?
Message-Id: <3781bdab@newsread3.dircon.co.uk>

Calvin <nospam@nospam.nospam> wrote:
> 
>     Is that all modules that can be used in my perl intepreter can also be
> use when i am writing CGI?? 

Of course you can a program that is using the CGI is no different to any other
excpet for the environment it runs in.

>                              Also, where can i download the DBI to postgresql
> modules from the net??

<http://www/perl.com/CPAN>

/J\
-- 
"The most frightening thing on television since Anthea Turner revealed
she had a sister" - Suggs


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

Date: Tue, 6 Jul 1999 12:39:55 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: DBI:Postgresql in Apache?
Message-Id: <7ltf61$dfl1@news.cyber.net.pk>

Calvin <nospam@nospam.nospam> wrote in message
news:7lsa14$anr$1@hfc.pacific.net.hk...
> Hi,
>     My server is using perl5, postgresql and apache1.3.

nice setup, but I would go for mysql.

>     Is that all modules that can be used in my perl intepreter can also be
> use when i am writing CGI?? Also, where can i download the DBI to
postgresql
> modules from the net??

www.cpan.org/modules/by-module/

Yes, you can use DBI when working with CGI, but DBI and DBD::* driver for
your
sql program (postgres) must be installed.




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

Date: Tue, 6 Jul 1999 17:56:11 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: DBI:Postgresql in Apache?
Message-Id: <7lu1mr$dfl4@news.cyber.net.pk>

> <http://www/perl.com/CPAN>

WARNING:

The above URL you are looking at has a big typo.
The corrected version would be:

http://www.perl.com/CPAN

;o)




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

Date: Sat, 03 Jul 1999 02:29:44 GMT
From: pigs_can_fly@mindless.com (Jason Q.)
Subject: Re: difficulty in reading a directory
Message-Id: <37826c14.1943463@news.cyberway.com.sg>

"Dodger" <dodger@dodger.org> wrote:

>shouldn't it just be:
>opendir (DIR, '/home/usr') or die "Yecch! Couldn't open /home/usr: $!\n";
>@files = grep /^$file.*\.txt$/, readdir DIR;
># gratuitous insulting error message follows if @files is empty #
>scalar @files or die "Silly freak! There are no files starting with $file in
>there!\n";
>closedir DIR;

Yes the above works, but my question is why doesn't

	@dir = `ls /home/usr/$file*.txt`;

work when there are ' singlequotes in them. Is the singlequote somehow
"messing up" the process?

This doesn't work either (when there is a ' in $file):

	`rm /home/usr/$file*.txt`;

I can't seem to find any info on this in the faq or manuals.

Thanks for all your help. Appreciated.


JQ


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

Date: 3 Jul 1999 18:20:08 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: difficulty in reading a directory
Message-Id: <7llk8o$a41$2@fcnews.fc.hp.com>

Jason Q. (pigs_can_fly@mindless.com) wrote:
: "Dodger" <dodger@dodger.org> wrote:

: >shouldn't it just be:
: >opendir (DIR, '/home/usr') or die "Yecch! Couldn't open /home/usr: $!\n";
: >@files = grep /^$file.*\.txt$/, readdir DIR;
: ># gratuitous insulting error message follows if @files is empty #
: >scalar @files or die "Silly freak! There are no files starting with $file in
: >there!\n";
: >closedir DIR;

: Yes the above works, but my question is why doesn't

: 	@dir = `ls /home/usr/$file*.txt`;

: work when there are ' singlequotes in them. Is the singlequote somehow
: "messing up" the process?

Yes, because it's a shell issue. Since the command inside backquotes
is sent to the posix shell, and a single quote starts a single-quoted
string in the shell, you're sending a non-terminated single-quoted
string to the shell. If you really want to use the shell and not
perl's readdir (or glob), quote your double and single quotes. Of
course, it still won't work if there's a space in $file either. So you
should enclose it in single quotes. But then in order to get a single
quote in single quotes, you have to use '\'' (i.e. close the single
quotes, one single quoted quote, then re-open the single quotes). But
at least you don't have quote your double quotes :) But then you also
have to quote your backslashes. Of course, your wildcard "*" has to be
outside the single quotes.

Now you see why everybody is ranting. They're just failing to explain
what was wrong between their rants. Perhaps they're breathless :)

sub shellquote
{
  my(@a)=@_;
  foreach(@a) {s/\\/\\\\/g;s/'/'\\''/g;}
  wantarray?map("'$_'",@a):"'$a[0]'";
}

$file=shellquote("bob's diner");
@dir=`ls $file*`;

: I can't seem to find any info on this in the faq or manuals.

probably want to carefully read the "quoting" section of your
posix shell manpage.

Andrew


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

Date: Sun, 04 Jul 1999 06:19:11 GMT
From: R.Joseph <streaking_pyro@my-deja.com>
Subject: Distribution
Message-Id: <7lmucq$lq6$1@nnrp1.deja.com>

How would I go about distributing my applications so that the end users
do not have to download Active Perl (I am targeting these apps towards
Win9X systems)?  Is this possible?

--
R.Joseph
http://www.24-7design.com
http://bowdown.to


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


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

Date: Sun, 4 Jul 1999 11:33:59 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Distribution
Message-Id: <7lo2it$asd4@news.cyber.net.pk>

> How would I go about distributing my applications so that the end users
> do not have to download Active Perl (I am targeting these apps towards
> Win9X systems)?  Is this possible?

www.perl2exe.com/




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

Date: Mon, 05 Jul 1999 20:34:04 GMT
From: nerilius@my-deja.com
Subject: Downloading A C EXE file,
Message-Id: <7lr4rs$rid$1@nnrp1.deja.com>

I'm trying to open a C executable file, save it in an array, alter it,
and send to it to a client for downloading.

I tried the subroutine below, and it didn't work correctly.  It messed
up the file.

sub download
{
open(PROGRAM, "<Prbmp.exe");
binmode PROGRAM;
@file=<PROGRAM>;
print "Content-type:application/octet-stream\r\n\r\n";
print "@file";
}



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


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

Date: 5 Jul 1999 18:02:25 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Downloading A C EXE file,
Message-Id: <slrn7o2ebc.h6v.abigail@alexandra.delanet.com>

nerilius@my-deja.com (nerilius@my-deja.com) wrote on MMCXXXIV September
MCMXCIII in <URL:news:7lr4rs$rid$1@nnrp1.deja.com>:
!! I'm trying to open a C executable file, save it in an array, alter it,
!! and send to it to a client for downloading.
!! 
!! I tried the subroutine below, and it didn't work correctly.  It messed
!! up the file.
!! 
!! sub download
!! {
!! open(PROGRAM, "<Prbmp.exe");
                              ^
                              |
                              +--  Where is the 'or die $!' part?
!! binmode PROGRAM;
!! @file=<PROGRAM>;
!! print "Content-type:application/octet-stream\r\n\r\n";
!! print "@file";                                 ^   ^
         ^     ^                                   \ /
         |     |                                    V
         +-----+------ Bad. Very, very bad.         |
                                                    |
                        I would hardcode that. -----+



Abigail
-- 
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
 |perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
 |perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
 |perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;


  -----------== 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: Tue, 6 Jul 1999 11:21:00 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Downloading A C EXE file,
Message-Id: <7ltahn$coh9@news.cyber.net.pk>

<nerilius@my-deja.com> wrote in message news:7lr4rs$rid$1@nnrp1.deja.com...
> I'm trying to open a C executable file, save it in an array, alter it,
> and send to it to a client for downloading.

Alter a C executable? Changing just one value can cause the program
to crash.

>
> I tried the subroutine below, and it didn't work correctly.  It messed
> up the file.
>
> sub download
> {
> open(PROGRAM, "<Prbmp.exe");
> binmode PROGRAM;
> @file=<PROGRAM>;
> print "Content-type:application/octet-stream\r\n\r\n";
> print "@file";
> }

Try this replacement:

sub download
{
    print "Content-type: application/octet-stream\n\n";
    open FILE , 'Prbmp.exe' or die "Couldn't open prbmp: $!";
        binmode FILE;
        print <FILE>;
    close FILE;
    # OR # print `cat Prbmp.exe` on Unix for above four lines
}

# do not replace anything in a C executable, instead if you want
to make an exe with user's input, you can just compile it on the
fly, with the modified source (not binary).




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

Date: Sat, 03 Jul 1999 14:06:23 GMT
From: nerilius@my-deja.com
Subject: Downloading Alterations
Message-Id: <7ll5cr$75j$1@nnrp1.deja.com>

I've been trying to write a cgi program in which:
1. The client requests a program to be downloaded (the client is using a
browser such as Netscape)
2. A CGI program alters one line in the program and sends it to the
client
3. The program has to be altered in a different way for each person that
downloads the program.  The program has to also allow multiple people
downloading at the same time.  Does anyone have any ideas?????


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


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

Date: Sat, 3 Jul 1999 19:50:39 +0500
From: "Faisal Nasim" <swiftkid@bigfoot.com>
Subject: Re: Downloading Alterations
Message-Id: <7lmbd7$ai51@news.cyber.net.pk>

<nerilius@my-deja.com> wrote in message news:7ll5cr$75j$1@nnrp1.deja.com...
> I've been trying to write a cgi program in which:
> 1. The client requests a program to be downloaded (the client is using a
> browser such as Netscape)
> 2. A CGI program alters one line in the program and sends it to the
> client
> 3. The program has to be altered in a different way for each person that
> downloads the program.  The program has to also allow multiple people
> downloading at the same time.  Does anyone have any ideas?????

something like:

$/ = undef;
open FILE , "/path/to/download.ext";
    $content = <FILE>;
close FILE;

#changes/addition/removal in $content here

print "Content-type: application/octet-stream\n\n$content";

?





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

Date: 3 Jul 1999 16:35:05 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Downloading Alterations
Message-Id: <slrn7nt0fm.31h.abigail@alexandra.delanet.com>

nerilius@my-deja.com (nerilius@my-deja.com) wrote on MMCXXXII September
MCMXCIII in <URL:news:7ll5cr$75j$1@nnrp1.deja.com>:
() I've been trying to write a cgi program in which:
() 1. The client requests a program to be downloaded (the client is using a
() browser such as Netscape)
() 2. A CGI program alters one line in the program and sends it to the
() client
() 3. The program has to be altered in a different way for each person that
() downloads the program.  The program has to also allow multiple people
() downloading at the same time.  Does anyone have any ideas?????


Well, since you have a very, very general question, I'll give you a
very, very general answer.

The program needs to do the following 3 things.

1) Get the request from the user, and find the program requested.
2) Read in the program, and change the line.
3) Send the program to the user.


HTH. HAND.



Abigail
-- 
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
             "\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
             "\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'


  -----------== 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: Tue, 06 Jul 1999 07:27:44 GMT
From: www@OpsResearch.com
Subject: Employment Opportunity - Transportation
Message-Id: <3781AFCE.1DC88B8E@OpsResearch.com>

For more information see:
  http://OpsResearch.com




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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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

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

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

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


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


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