[16023] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3435 Volume: 9

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

Date: Tue, 20 Jun 2000 18:05:11 -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: <961549511-v9-i3435@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 20 Jun 2000     Volume: 9 Number: 3435

Today's topics:
    Re: [ String ] How to divide a string into equal string <thoren@southern-division.com>
    Re: [ String ] How to divide a string into equal string <tina@streetmail.com>
    Re: BIG BUG in CGI.pm on Internet Explorer !! (Jerome O'Neil)
    Re: BIG BUG in CGI.pm on Internet Explorer !! (David Efflandt)
    Re: BIG BUG in CGI.pm on Internet Explorer !! <godzilla@stomp.stomp.tokyo>
    Re: creating a file that doesn't exist <rootbeer@redcat.com>
    Re: Data Source Name <smile773@bigfoot.com>
        File and string manipulation anuragmenon@my-deja.com
        Finding Windows and Program Files directories tsackett@iname.com
        How can I get perl (cgi) html to work on the OS Seal ? <smile773@bigfoot.com>
    Re: Newbie question about subroutines... <rob13@rock13.com>
        Newbie, need help with pipes lauren41@my-deja.com
    Re: Newbie, need help with pipes lauren41@my-deja.com
        News -server login w/ News::NNTP 8inches_manmeat@my-deja.com
    Re: News -server login w/ News::NNTP (Steven Smolinski)
        NOT a Newbie Form - Perl - mail?! <Jon@KCSOnline.co.uk>
    Re: NOT a Newbie Form - Perl - mail?! <rob13@rock13.com>
    Re: Novell Server and Perl <rootbeer@redcat.com>
    Re: Passing a database handles to subs.... <david@dbillingham.demon.co.uk>
    Re: Perl Builder 2.0 for LINUX - Beta Available sty2999@my-deja.com
    Re: Perl Timer help <billy@arnis-bsl.com>
    Re: Perl Timer help <rootbeer@redcat.com>
    Re: perl2C compiler <lauren_smith13@hotmail.com>
        Problems with IIS (for a change) - DBD::CSV::st <guy@firstcreative.com>
    Re: Running another script <hakon.alstadheim@oslo.mail.telia.com>
    Re: Running another script <r.meEEEtcalfNOSPAM@exXXX.acCCC.ukKKK>
    Re: Running another script <r.meEEEtcalfNOSPAM@exXXX.acCCC.ukKKK>
    Re: simple array question <ils@gil.com.au>
    Re: simple array question (Steven Smolinski)
        sourcing bash script w/ Perl? (Peter Bismuti)
    Re: Viewing Multipart/Mixed messages <rootbeer@redcat.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 21 Jun 2000 00:01:44 +0200
From: "Thoren Johne" <thoren@southern-division.com>
Subject: Re: [ String ] How to divide a string into equal string
Message-Id: <8ioplm$5mu$18$1@news.t-online.com>

TheEx0rcist <TheEx0rcist@fanclub.org> wrote in message
news:8iop7e$1bjp$1@news4.isdnet.net...

> That Simple ?
> Damn you are great !!
> Thank you !!

even i have lucid moments... sometimes ;)

gruß
thoren
8#X

--
----------------------------------------------------------------------
Thoren Johne - 8#X - thoren@southern-division.com
Southern Division Classic Bikes - www.southern-division.com




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

Date: 21 Jun 2000 00:36:29 GMT
From: Tina Mueller <tina@streetmail.com>
Subject: Re: [ String ] How to divide a string into equal string
Message-Id: <8ip2md$5a8pr$2@fu-berlin.de>

hi,

Lauren Smith <lauren_smith13@hotmail.com> wrote:

> TheEx0rcist <TheEx0rcist@fanclub.org> wrote in message
> news:8iol58$u1m$1@news5.isdnet.net...
>> my $string = 'abcdefghijmnopqrstuvwxyz';
>> my @strings = &divide($string,$n);
>> print join("\n",@strings);
>> --
>> abcdefg    # 7 characters
>> hijklmn     # 7 characters
>> opqrstu    # 7 characters
>> vwyz        # 4 characters
>> --
>>
>> I'd like a _simple_ way to do this.

> What have you tried?  Have you looked at the split() function?

> Lauren (who also notes that the American alphabet has 26 letters, not 25 :-)

this is a miracle.
how to divide a string with 24 letters (alphabet without k,l)
into 25 letters (alphabet without x)?
i can't find a way...

:-)

tina


-- 
http://tinita.de    \  enter__| |__the___ _ _ ___
tina's moviedatabase \     / _` / _ \/ _ \ '_(_-< of
search & add comments \    \ _,_\ __/\ __/_| /__/ perception
"The Software required Win98 or better, so I installed Linux."


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

Date: Tue, 20 Jun 2000 22:10:32 GMT
From: jerome@activeindexing.com (Jerome O'Neil)
Subject: Re: BIG BUG in CGI.pm on Internet Explorer !!
Message-Id: <sZR35.319$j51.5682@news.uswest.net>

Makau Divangamene <makau@multimania.com> elucidates:
> That thing is driving me crazy !!!
>  What's weird is that ENV
> {QUERY_STRING} is correct but as soon as I try retrieving variables
> with the param($key) method of CGI.pm, it simply doesn't work
> (sometimes) !!

I'd be willing to bet the bug is in IE.  Can you post some code that
demonstrates this behaviour?


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

Date: 20 Jun 2000 23:52:25 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: BIG BUG in CGI.pm on Internet Explorer !!
Message-Id: <slrn8l00ti.bd7.efflandt@efflandt.xnet.com>

On Tue, 20 Jun 2000, Makau Divangamene <makau@multimania.com> wrote:
>That thing is driving me crazy !!!
>
>CGI.pm keeps omitting parameters of $ENV{QUERY_STRING} randomly on
>IE5 !! In the beginning when my code was rather simple, there was
>absolutely no problem. But I soon as my code grew up more and more, up
>to using 10 different modules, I noticed that CGI.pm suddenly started
>omitting parameters on IE5 (no problem with Netscape). Sometimes it
>even drops the hole query string !! What's weird is that ENV
>{QUERY_STRING} is correct but as soon as I try retrieving variables
>with the param($key) method of CGI.pm, it simply doesn't work
>(sometimes) !!
>
>I would really be happy to know if someone has encountered the same
>problem. If so, how they solved it.
>
>Thank you very very much !! This is a crictical problem !!
>
>: Using Perl 5.005_02 on Linux RH

I have not noticed such a problem, but then, I don't use MSIE much except
to test things.  If you are using html forms instead of generating them
with CGI.pm, maybe you are not properly url-encoding the query strings.  
An actual example or URL of form, script and script source that
demonstrates the problem would be more useful for troubleshooting than
speculation.  And a cgi newsgroup is more appropriate for that.

-- 
David Efflandt  efflandt@xnet.com  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/  http://cgi-help.virtualave.net/



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

Date: Tue, 20 Jun 2000 17:43:37 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: BIG BUG in CGI.pm on Internet Explorer !!
Message-Id: <39500FB9.4D3EE2B5@stomp.stomp.tokyo>

Makau Divangamene wrote:

> CGI.pm keeps omitting parameters of $ENV{QUERY_STRING} randomly on
> IE5 !! In the beginning when my code was rather simple, there was
> absolutely no problem. 

(snip)

> What's weird is that ENV {QUERY_STRING} is correct but as soon 
> as I try retrieving variables with the param($key) method of 
> CGI.pm, it simply doesn't work (sometimes) !!
 
> I would really be happy to know if someone has encountered 
> the same problem. If so, how they solved it.
 
It's not cgi.pm at all. It is MSIE 4.01 and 5.01 on
certain systems. Certain versions of Win NT do this
and, quite a few lynx browsers and lynx O/S also do 
this. These systems clobber a query string and clobber
a referrer variable. This appears random only because
certain combinations of browsers and systems do this.

I discovered this through direct observation using
a redirect cgi program to keep count of hits on
selected files, mostly sound files and pictures
along with protecting them from bandwidth theft.

MSIE, Win NT and Lynx, often are not up to industry
standards. Mozilla and Win 98 SE are the only combination
which currently meet customary industry standards. 
I've given up on using certain types of cgi programs
which rely on a query string or a referrer variable.
They just don't work consistently because of a lack
of so many systems not meeting industry standards.

A related problem is MAC/Apple, the Etch-A-Sketch
of computers. Very often a MAC/Apple will turn a
hyperlink, such as bornwild.mid into bornwild.smi
for whatever reason. Ask Mr. Jobs, it's his job.

MSIE, Win NT, Lynx, MAC, pfffftt... paperweights,
nothing more. Leading offenders per my records
are MSIE and Lynx.

Change your methods to be as simple as possible to
deal with these Tinker Toy systems. You will still
have problems but not as many. These systems just
cannot handle the challenges of our internet.

I notice you are using MSIE 5.01 over Win NT 5.0
for your system. There is half your problem.
Change to MSIE 5.01 overlaying Win 98 SE, your
problems will vanish, your problems but not
for others, obviously.

How you do like using Lyonnaise Cable? Reliable?


Godzilla!


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

Date: Tue, 20 Jun 2000 17:41:41 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: creating a file that doesn't exist
Message-Id: <Pine.GSO.4.10.10006201740010.29843-100000@user2.teleport.com>

On Tue, 20 Jun 2000, Lauren Smith wrote:

> > I'm trying to figure out how to create a file that doesn't already exist
> > from a script on an apache web server. 

> $file = 'path/to/file';
> unless (-e $file) {
>    open FILEHANDLE, ">$file" or die "Can't open $file: $!";
> }

There's a concurrency problem there. Between the time that you check for
existence and the moment of creation, the file may be created. The OP's
code (from the FAQ) avoids that problem. Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 20 Jun 2000 22:28:18 GMT
From: "smile773" <smile773@bigfoot.com>
Subject: Re: Data Source Name
Message-Id: <6eS35.15093$Xx5.781343@bgtnsc06-news.ops.worldnet.att.net>

yes odbc > = 2.5 nt server under control panel.odbc.system data sources
dialog window shows all the data source names
William Crites <wcrites@cis.ctc.edu> wrote in message
news:394FB82E.DD97A11B@cis.ctc.edu...
> Do you think it is possible to get names (DSN) from ODBC on NT Server? I
> want to have all name for records.
> Thanks
>
> NT Administrator
> Wm. Crites
>
>




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

Date: Wed, 21 Jun 2000 00:05:07 GMT
From: anuragmenon@my-deja.com
Subject: File and string manipulation
Message-Id: <8ip0ra$3qq$1@nnrp1.deja.com>

I am perl newbie and I hope you guys will pardon my ignorance if my
question is dumb.

I have to write a VRML generator in perl.

his is what I want the generator to do.


1. Construct a string pertaining to the animation part of the VRML file
being generated.

2. Lets call that say String1

3. now what I want to do is sandwich this string between two other text
files and make the whole thing one text file and name it something like
test.wrl

4. What I am trying to achieve is...

TextFile1 + String1 + TextFile2 => TextFile3

5. rename TextFile3 as test.wrl

Is this even possible? do let me know..I appreciate suggestions -
pseudocode - real code snippets..anything!

Vinod.


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


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

Date: Wed, 21 Jun 2000 00:39:29 GMT
From: tsackett@iname.com
Subject: Finding Windows and Program Files directories
Message-Id: <8ip2rv$568$1@nnrp1.deja.com>

In a script for Win32, how can I find out the path to the Windows
directory and the "Program Files" directory?

This may seem like a simple problem, but "c:\windows" and "c:\program
files" aren't good enough. Here's why:

This script must run on a number of different machines, each of which
may have a unique name for the "system" folder (e.g. "c:\WinNT" instead
of "c:\Windows"). Also, some of the machines are in different languages,
so the "Program Files" directory may not have different names.

In MacPerl, there are some libraries that let you query the name of the
system folder and several other "special" folders. Does anything similar
exist in Win32? Is there some sort of registry query that I can run from
a Perl script?

thanks,
Tom Sackett


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


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

Date: Tue, 20 Jun 2000 23:02:45 GMT
From: "smile773" <smile773@bigfoot.com>
Subject: How can I get perl (cgi) html to work on the OS Seal ?
Message-Id: <pKS35.10862$Uw3.705670@bgtnsc04-news.ops.worldnet.att.net>

Seal is a dos (gui) OS but is still in it's infancy.
I would like to incorporate perl as a problem solving tool.
Because of many developmental problems with 32 bit pmode
I would like to use html  for input and output.

The person named Drew Simonis need not reply < rude

If you nice ppl have some information that will help me get
perl working in a dynamic cgi mode with seal, I am
looking forward to hearing from you.

A simple example like Brian Jepson's  xyzzy.pl
where checkbook.dat is posted as an html targeted to
netscape under win NT .

How can I do that in Seal ?








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

Date: Tue, 20 Jun 2000 19:26:24 -0400
From: "Rob - Rock13.com" <rob13@rock13.com>
Subject: Re: Newbie question about subroutines...
Message-Id: <394FFDA0.5527D323@rock13.com>

Vlasis Hatzistavrou wrote:
> 
> Hello,
> 
>     I'd like to know if there is a way in Perl to laucnh different
> subroutines running at the same time. If this is not possible, should I
> use different programs? If so, how can I get themn to run at the same
> time? I use Windows NT4.0.

I'm rather new to Perl but one sub can call another if that's what you
mean - I suppose it can call itself too. Other than that the sub will
run when the program tells it to.
-- 

Rob
http://rock13.com/webhelp/
Fight Spam - http://www.cauce.org/


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

Date: Tue, 20 Jun 2000 22:35:58 GMT
From: lauren41@my-deja.com
Subject: Newbie, need help with pipes
Message-Id: <8iorkd$2m$1@nnrp1.deja.com>

I am writing a script that launches a waveform viewer called csimg. This
program sends messages to the shell and opens an additional window as
well, which displays waveforms and also receives input from the user.
All that I need to do is launch the program (passing it a file as
command-line input), execute about 15-20 commands within the program,
and close it. So, to test this, I created a pipe and printed 2 lines of
output to the pipe. When I run the script, csimg launches but ignores
the output. It does not seem as if my script is trying to send to the
output to the shell rather than the display window because my lines of
output are not being printed in the shell (or the display window for
that matter). Here is my test script:

#! /usr/bin/perl -w
use strict;
$|++;

open CSIMG, "| csimg punchfile.pun" or die "can't fork: $!";
local $SIG{PIPE} = sub { die "csimg pipe broke"; };
print CSIMG "d1 icv2\r";
print CSIMG "a1 ivvmclk\r";
print CSIMG "quit\r";
close CSIMG or die "bad csimg: $! $?";

###---end of script

That's it. Seems simple enough. Only problem is that all it does is
launch csimg...nothing happens afterwards. I have tried using \n instead
of \r and it makes no difference. I have also tried it without the $|++
at the beginning with the same result.

Any advice would be greatly appreciated.

Thanks.
Lauren


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


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

Date: Tue, 20 Jun 2000 23:40:53 GMT
From: lauren41@my-deja.com
Subject: Re: Newbie, need help with pipes
Message-Id: <8iove2$2tu$1@nnrp1.deja.com>

Never mind...I found out that I can't just print strings to csimg
because it's looking for keyboard events...ah well...


In article <8iorkd$2m$1@nnrp1.deja.com>,
  lauren41@my-deja.com wrote:
> I am writing a script that launches a waveform viewer called csimg.
This
> program sends messages to the shell and opens an additional window as
> well, which displays waveforms and also receives input from the user.
> All that I need to do is launch the program (passing it a file as
> command-line input), execute about 15-20 commands within the program,
> and close it. So, to test this, I created a pipe and printed 2 lines
of
> output to the pipe. When I run the script, csimg launches but ignores
> the output. It does not seem as if my script is trying to send to the
> output to the shell rather than the display window because my lines of
> output are not being printed in the shell (or the display window for
> that matter). Here is my test script:
>
> #! /usr/bin/perl -w
> use strict;
> $|++;
>
> open CSIMG, "| csimg punchfile.pun" or die "can't fork: $!";
> local $SIG{PIPE} = sub { die "csimg pipe broke"; };
> print CSIMG "d1 icv2\r";
> print CSIMG "a1 ivvmclk\r";
> print CSIMG "quit\r";
> close CSIMG or die "bad csimg: $! $?";
>
> ###---end of script
>
> That's it. Seems simple enough. Only problem is that all it does is
> launch csimg...nothing happens afterwards. I have tried using \n
instead
> of \r and it makes no difference. I have also tried it without the
$|++
> at the beginning with the same result.
>
> Any advice would be greatly appreciated.
>
> Thanks.
> Lauren
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


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


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

Date: Tue, 20 Jun 2000 22:19:06 GMT
From: 8inches_manmeat@my-deja.com
Subject: News -server login w/ News::NNTP
Message-Id: <8ioqkr$aho$1@nnrp2.deja.com>

Hello,

I am trying to write a script that will successfully print out the articles
in 'talk.atheism' with the Net::NNTP module.  All is well if I specify a news
server that doesn't require authentication. See? this works:

--
use News::NNTPClient;

$c = new News::NNTPClient("news.ku.ac.th");


($first, $last) = ($c->group("talk.atheism"));


for (; $first <= $last; $first++) {
        print $c->article($first);
}

_END_

--

But I want to use the machine news.earthlink.net.  Can anybody show me a way
to have the server prompt me for, and accept my login and password?  I don't
really care if it gets sent in cleartext, but encrypted would be nice too. 
Much Obliged, GKhalsa


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


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

Date: Wed, 21 Jun 2000 00:29:17 GMT
From: sjs@yorku.ca (Steven Smolinski)
Subject: Re: News -server login w/ News::NNTP
Message-Id: <slrn8l032h.pef.sjs@john.sympatico.ca>

8inches_manmeat@my-deja.com <8inches_manmeat@my-deja.com> wrote:
>Hello,

Hi.

>I am trying to write a script that will successfully print out the articles
>in 'talk.atheism' with the Net::NNTP module.  All is well if I specify a news
>server that doesn't require authentication. See? this works:
>
>--
>use News::NNTPClient;
[...]

I thought you were using Net::NNTP?  Oh well, if you look in the docs
for Net::NNTP you'll see the method authinfo( $user, $password ). 
(Albeit the docs are rather sparse for that method.)

In my copy of Net::NNTP, though I didn't find it in the docs, there's
also a method authinfo_simple( $user, $pass ).  Find out what type
of authentication your server accepts and try the corresponding
method.  

Steve


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

Date: Tue, 20 Jun 2000 23:55:13 +0100
From: "Jon Langley" <Jon@KCSOnline.co.uk>
Subject: NOT a Newbie Form - Perl - mail?!
Message-Id: <8iosjm$ied$1@news5.svr.pol.co.uk>

I lied, I am really, but I have written a script to email data from a form ,
but can't get it to email directly from the script.

I look at other scripts, and they all use programs, either currently on a
site (bin/mail) or other programs like blat.exe which gives out specific
variables.

Can what I want to do, send mail, or (as my web server does not have
bin/mail) do I have to get a bin/mail program like blat or better???!

Jon





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

Date: Tue, 20 Jun 2000 19:31:42 -0400
From: "Rob - Rock13.com" <rob13@rock13.com>
Subject: Re: NOT a Newbie Form - Perl - mail?!
Message-Id: <394FFEDE.CA478D89@rock13.com>

Jon Langley wrote:
> 
> I lied, I am really, but I have written a script to email data from a form ,
> but can't get it to email directly from the script.
> 
> I look at other scripts, and they all use programs, either currently on a
> site (bin/mail) or other programs like blat.exe which gives out specific
> variables.
> 
> Can what I want to do, send mail, or (as my web server does not have
> bin/mail) do I have to get a bin/mail program like blat or better???!
> 
> Jon

If the server allows you can send the mail via SMTP. You sure mail or
sendmail isn't on the machine?
-- 

Rob
http://rock13.com/webhelp/
Fight Spam - http://www.cauce.org/


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

Date: Tue, 20 Jun 2000 17:33:38 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Novell Server and Perl
Message-Id: <Pine.GSO.4.10.10006201727340.29843-100000@user2.teleport.com>

On Tue, 20 Jun 2000, Thoren Johne wrote:

> > Could be both. Have you tried (to ask an admin) to install a newer
> > version?
> 
> he told me that it's the latest version - for novell

Uh oh. I just checked the ports page:

    http://www.cpan.org/ports/#netware

 ...which says in part, "Note that the currently (March 1999) available
NetWare port is based on the ActiveWare port of Perl 5.003_07 (October
1996, a very old and unsupported release of Perl). A port based on the
5.005 (July 1998 and newer) is in the works." If this text isn't outdated,
the Novell port sure is. :-P

Folks who are savvy about Novell should start work to get 5.6 to work for
them, or they'll be left way behind. Unless using Novell means that you're
way behind already. :-)

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 21 Jun 2000 00:56:05 +0100
From: "David" <david@dbillingham.demon.co.uk>
Subject: Re: Passing a database handles to subs....
Message-Id: <961548923.3621.0.nnrp-14.c2deb140@news.demon.co.uk>


----- Original Message -----
From: West, Glenn A <glenn.west@eds.com>
To: <david@dbillingham.demon.co.uk>
Sent: 20 June 2000 17:53
Subject: Re: Passing a database handles to subs....

> There are two ways.  Use the reference directly (do_work1) or pass in a
> reference to a reference (do_work2).  The latter, of course, requires you
to
> do a dereference in the subroutine.  Actually I guess you could come up
with
> an infinite number of ways by passing in references to references.
>
> #!/usr/bin/perl
>
> use DBI;
>
> $dbh=DBI->connect("dbi:Ingres:control_memo");
>
> do_work1($dbh);
>
> do_work2(\$dbh);
>
> $dbh->disconnect;
>
> # Pass in the reference
> sub do_work1

>
> my ($dbh)=$_[0];
>
>
> $sth=$dbh->prepare("SELECT cntrl_memo_nbr FROM t_memo_detail");
>
> $sth->execute();
>
> while ($cntrl_memo_nbr=$sth->fetchrow())

>                          print "ctrl_memo_nbr\n";
>
>         }
>
> $sth->finish();
> }
>
> # Pass in the reference to the reference
> sub do_work2

>
> my ($dbh_ref)=$_[0];
>
>
> $sth=$$dbh_ref->prepare("SELECT cntrl_memo_nbr FROM t_memo_detail");
>
> $sth->execute();
>
> while ($cntrl_memo_nbr=$sth->fetchrow())

>         print "$cntrl_memo_nbr\n";
>         }
>
> $sth->finish();
> }
>
> The above works the same for statement handles produced by the "prepare"
DBI
> method.
>
> HTH...

Dear Glenn

Thanks for the above - much appreciated. All becomes clear! Not quite sure
why I couldn't get at least version1 myself....

Regards

David




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

Date: Wed, 21 Jun 2000 00:29:34 GMT
From: sty2999@my-deja.com
Subject: Re: Perl Builder 2.0 for LINUX - Beta Available
Message-Id: <8ip28u$4p8$1@nnrp1.deja.com>

Hi,

> I may be mistaken, but I suspect that (at least part of) the point was
> that it's rarely correct to set permissions to 777 (recursively
yet!). In
> fact, it's likely to be a potentially-serious security problem.


This was a mistake...for which we apologize. We do need to provide
write access to these directories, but not execute. We have uploaded an
update which fixes this.

Have any of you guys actually tried the software? We would certainly
value your feedback....

thanks,

Marty Ford
Solutionsoft


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


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

Date: Tue, 20 Jun 2000 22:02:40 GMT
From: Ilja Tabachnik <billy@arnis-bsl.com>
Subject: Re: Perl Timer help
Message-Id: <8ioplm$un9$1@nnrp1.deja.com>

In article <8ioh0m$o19$1@nnrp1.deja.com>,
  felrodian@my-deja.com wrote:
>
>
> > I don't understand what it is supposed to do but that will
definitely
> > get into an infinite loop.
> Yes! An infinite loop.. that's what I want. I want an infinite loop
that
> will run a subroutine every x seconds or x minutes. Any suggestions
> greatly appreciated.
>

If that's really all you want, then:

while (1)
{

     sleep $for_some_seconds;

     # do something usefull here

}

For more details see your local 'perldoc -f sleep'
or http://www.cpan.org/doc/manual/html/pod/perlfunc/sleep.html.

Or maybe use cron (if you are on Unix).

Hope this helps.
Ilja.




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


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

Date: Tue, 20 Jun 2000 17:37:42 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Perl Timer help
Message-Id: <Pine.GSO.4.10.10006201736180.29843-100000@user2.teleport.com>

On Tue, 20 Jun 2000 felrodian@my-deja.com wrote:

> Yes! An infinite loop.. that's what I want. I want an infinite loop
> that will run a subroutine every x seconds or x minutes. Any
> suggestions greatly appreciated.

You're reinventing cron. If your system already provides such a facility,
you're wasting your system's resources, and your own time. But, if you
must do this, do as others have suggested and look up sleep() in the
perlfunc manpage. Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 20 Jun 2000 15:22:39 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: perl2C compiler
Message-Id: <8ioqql$r2v$1@brokaw.wa.com>


Michael Branch <mbranch@viawest.net> wrote in message
news:394FE902.2190B27C@viawest.net...
>hi,
>  is there a perl to C program to be found?

perlfaq3: How can I compile my Perl program into byte code or C?

Lauren





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

Date: Wed, 21 Jun 2000 01:50:40 +0100
From: "Guy Fraser" <guy@firstcreative.com>
Subject: Problems with IIS (for a change) - DBD::CSV::st
Message-Id: <8ip3h0$bi7$1@plutonium.compulink.co.uk>

Hi.

We've recently got an IIS server running on NT4.

I've got a perl script created and tested locally (win98, Sambar server -
www.sambar.com) which works fine.

When I upload to the IIS server (with all latest modules loaded using
ActiveState PPM) I get the following headache:

DBD::CSV::st execute failed: Cannot open
C:\Inetpub\wwwroot\cgi-bin\glossary\c:/Inetpub/wwwroot/cgi-bin/glossary:
Invalid argument at C:/Perl/site/lib/DBD/File.pm line 469.

Anyone had this problem? I've hunted through every FAQ I can find but can't
see a mention of this problem.

Any help will reduce my consumption of headache tablets ;o)

Regards,

Guy (tired, stressed and overworked!)





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

Date: 20 Jun 2000 17:14:47 -0300
From: Hakon Alstadheim <hakon.alstadheim@oslo.mail.telia.com>
Subject: Re: Running another script
Message-Id: <m08zw0nm88.fsf@alstadhome.cyberglobe.net>

"Robert Metcalf" <r.meEEEtcalfNOSPAM@exXXX.acCCC.ukKKK> writes:
> Your right, this method is probally just me being a dumb arse.
> I just want to write the security stuff once throughout my system.
> So the next question is how?
> I don't know how to create a module, but is there an include statment like
> the one in Power Basic that simply copies the specified text file to replace
> the statment before it runs the entire code?

I strongly recommend looking at some simple module (non OO/XS as a
start). It'll teach you lots. Try Text::Tabs as an example. Then look
at the source of the module. Check out 'perldoc perlmod' (and anything
else with '...mod' thats listed in 'perldoc perl').


However, if you are in a hurry and you don't mind polluting your
namespace, you could check out the :
--
do "path/file"
--
statement.

See documentation at 'perldoc -f do', in the 'do EXPR' section.



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

Date: Tue, 20 Jun 2000 23:40:55 +0100
From: "Robert Metcalf" <r.meEEEtcalfNOSPAM@exXXX.acCCC.ukKKK>
Subject: Re: Running another script
Message-Id: <8iorpk$eprm$1@athena.ex.ac.uk>

Ok, thanks for your help. I have found 1/2 of the answer, and for the rest
I'll clarify the problem a little more.
I am not running a script passed to me via a form.
I have access to a cgi-bin directory in which my security script will
reside.
Authorised web masters don't have access to an executable directory.
Forms, etc. are sent first to my script, whcih then runs another script
somewhere else on the server.
Here is my code so far using what I have found out due to your perldocs
reference, I need some help writing code where the *'s are:
#!/usr/bin/perl
use CGI qw(param);

@names = param;
$str_to_pass = "";
$fir = "Y";
$RJM_url = param('RJM_url');
foreach (@names) {
 if ($_ ne "RJM_url") {
  if ($fir ne "Y") {
   $str_to_pass = $str_to_pass . "&";
  };
  $fir = "N";
  $str_to_pass = $str_to_pass . "$_=".param($_);
 };
};

if (Input_Ok) {
 ##I need to put something here that runs $RJM_url with parameters
 ##$str_to_pass ***************************************
 ##note rjm url is not actually a url, and is something like
"\usrname\welcome.cgi"
} else {
 print "<HTML><TITLE>security check</TITLE><HEAD></HEAD><BODY>FATEL
ERROR</BODY></HTML>";
};

##subs below -------------------------------------------------------------
sub Input_Ok {
 $ok = "Y";
 #code to check if it isn't ok
 #checks for <, >, etc.
 return $ok;
};

Thanks
Robert
----------------------------------------------------------
REMOVE all capital letters to email me

FYI: If the subject of the message is:
Newbie Question
Please help me
or anything else not conatining the topic of the message, I tend to skip the
post.





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

Date: Tue, 20 Jun 2000 23:51:53 +0100
From: "Robert Metcalf" <r.meEEEtcalfNOSPAM@exXXX.acCCC.ukKKK>
Subject: Re: Running another script
Message-Id: <8iose5$eumq$1@athena.ex.ac.uk>

"Hakon Alstadheim" <hakon.alstadheim@oslo.mail.telia.com> wrote
> However, if you are in a hurry and you don't mind polluting your
> namespace, you could check out the :
> --
> do "path/file"
> --
> statement.
Do comes agoniseingly close to what I want. There's just no way to pass
parametres to it normally, however  ... hmmm ... come to think of it it's
perfect.
I'll nolonger need to transulate the parametres myself I'll elave that to
the client.
 .. I'll ust try it out

 .. Your a gienous! It's perfect. Brillent. Now I just have to presuade the
people who are in charge of the server that this script will protect them &
everyone using the server can create wild www sites!

Thanks very much to all who helped me,
There may b plenty of ppl @ exeter uni who owe u thanks
Rob
----------------------------------------------------------
REMOVE all capital letters to email me

FYI: If the subject of the message is:
Newbie Question
Please help me
or anything else not conatining the topic of the message, I tend to skip the
post.





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

Date: Wed, 21 Jun 2000 09:20:39 +1000
From: "Phil Sutcliffe" <ils@gil.com.au>
Subject: Re: simple array question
Message-Id: <39500498_1@news.bne.gil.com.au>

"Tad McClellan" <tadmc@metronet.com> wrote in message
news:slrn8kuu0u.gc2.tadmc@magna.metronet.com...
>
> What did I say that is "blatently" unfriendly?
>

Perhaps I'm over sensitive, but I don't take too kindly to being patronised
and smart comments like

>You don't wear a seat belt in the car either, do you?

In my orginal post I greatly simplified my example in the hope I would get a
simple answer (which as yet, is still not forthcoming). The fact that it
will not be a trivial matter to change the code is because my need is much
more complex then I have described here (and in fact, would take great
lengths to describe here). I sincerely apologise for not making myself clear
about exactly why it would be "non-trivial" to change to a hash in my
previous post.

My original question still remains.

>Consider this.
>
>@fields=("GBH","QLD","1234");
>
>@names=("\$company","\$state","\$postcode");
>
>Is there a way to get "GBH" into variable $company without using loops.
>
>I realise I can do this
>
>${$names[0]} = $fields[0];
>
>What I'm looking for is something like
>
>\@names = @fields; to get all the elements of @fields into the field names
>contained in @names so that $company = GBH etc.


Regards,

Phil.





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

Date: Wed, 21 Jun 2000 00:49:22 GMT
From: sjs@yorku.ca (Steven Smolinski)
Subject: Re: simple array question
Message-Id: <slrn8l0486.pef.sjs@john.sympatico.ca>

Phil Sutcliffe <ils@gil.com.au> wrote:
>"Tad McClellan" <tadmc@metronet.com> wrote:

>> What did I say that is "blatently" unfriendly?
>
>Perhaps I'm over sensitive, but I don't take too kindly to being patronised
>and smart comments like
>
>>You don't wear a seat belt in the car either, do you?
>
>In my orginal post I greatly simplified my example in the hope I would get a
>simple answer (which as yet, is still not forthcoming). [...]

Well, the simple answer that you got was that it will be trivial once you
remove the symrefs.  Symrefs *make* things harder.  You can't have 
your symrefs and your simplicity too.  (Or is that, can't have your
simplicity and eat it too? :-)

>My original question still remains.

And it will probably continue to remain if you ignore the best solution.
The time spent replacing symrefs will probably pay for itself within a
couple of maintenance cycles.  It is almost always the way to go.

Steve


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

Date: 21 Jun 2000 00:48:47 GMT
From: bismuti@cs.fsu.edu (Peter Bismuti)
Subject: sourcing bash script w/ Perl?
Message-Id: <8ip3df$4o3$1@news.fsu.edu>

I have a bash script that sets environment variables, I'd like
to call it within a Perl script so that Perl sees these variables.

I tried execiting something like:

	system("source bashscript.sh");

but when I try to check one of the env variables, it has not been set

	print "classpath = $ENV{$CLASSPATH} \n"; 

outputs:

	classpath = '' 

How can this be done?  

Thanks! 



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

Date: Tue, 20 Jun 2000 17:26:47 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Viewing Multipart/Mixed messages
Message-Id: <Pine.GSO.4.10.10006201721450.29843-100000@user2.teleport.com>

On Tue, 20 Jun 2000, Ramesh Vadlapatla wrote:

> To be more precise, how would I implement a web based mail viewer like
> how hotmail, excite...etc provide using Perl. I am only looking at
> viewing the message and not trying to implement any more features of a
> mail client.

Okay; I understand that. :-)

It sounds as if you want to translate a message into HTML which lets the
viewer access the parts of the message. That is, if the message contains
an image segment, you'd like to make that an <IMG> tag for that image.
Probably you can generate the HTML and image on the fly, from a CGI
program.

> What RFC's should I be looking at and are there any modules that do
> something like this?

There are a lot of RFCs which may be applicable. 

    http://dir.yahoo.com/Computers_and_Internet/Standards/RFCs/

And the same goes for modules.

    http://search.cpan.org/

 ...but you shouldn't have to look up much in the RFCs if you use the CGI
module and have a basic understanding of HTML. There are modules for
working with MIME messages, too. 

Good luck with it!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

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


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