[10918] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4519 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 30 15:07:27 1998

Date: Wed, 30 Dec 98 12:00:25 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 30 Dec 1998     Volume: 8 Number: 4519

Today's topics:
    Re: About Perldoc droby@copyright.com
    Re: An interesesting? problem.... (Abigail)
    Re: Apache/mod_perl request handlers and cookies (Mads Toftum)
        APR Calculator <nader@180.net>
    Re: C++ new to new(nothrow) <d-edwards@nospam.uchicago.edu>
    Re: Can Perl read/load Windows clipboard? (Clay Irving)
    Re: EXPERIENCED IN PERL ? <gellyfish@btinternet.com>
        Flock not working Can't figure out why! <support@counter.w-dt.com>
    Re: Getting error with "chomp" <tgambini@wfubmc.edu>
    Re: Getting error with "chomp" (Matthew Bafford)
        I NEED HELP!  =-) <les@livingscriptures.com>
    Re: Is there a way to read incoming mail on a win32 box <gellyfish@btinternet.com>
    Re: LinkExtor (brian d foy)
    Re: LinkExtor <debot@xs4all.nl>
    Re: LinkExtor <gellyfish@btinternet.com>
    Re: Logging out <gellyfish@btinternet.com>
    Re: LWP, getstore <r_larsen@image.dk>
    Re: Modules and Mysql patrick@cre8tivegroup.com
    Re: Modules and Mysql (brian d foy)
    Re: Perl Cookbook (Abigail)
    Re: Perl on NT - How to run as a daemon process (Mjd440)
        Perl Win32 and ODBC? <stephen.craft@mail.tju.edu>
        Perl, Netscape and Internet Explorer...:( <Tojo.Punnoose@Blr.Sni.De>
    Re: Perl, Netscape and Internet Explorer...:( (John Stanley)
    Re: Perl--sql--win32--command??? toffie@my-dejanews.com
    Re: perldocs in print? <upsetter@ziplink.net>
        Please help will generating biased random numbers. chad@vcn.net
    Re: random number problem (Randal L. Schwartz)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Wed, 30 Dec 1998 17:35:10 GMT
From: droby@copyright.com
Subject: Re: About Perldoc
Message-Id: <76do8e$13b$1@nnrp1.dejanews.com>

In article <76995d$232$1@gellyfish.btinternet.com>,
  Jonathan Stowe <gellyfish@btinternet.com> wrote:
>
> perldoc is a program that allows you to view the Perl documentation from its
> native POD format.  perldoc -f searches for a function of the same name as the
> second argument in the perlfunc documentation and displays the result.
> perlfaq -q similarly searches for a keyword in the perlfaq[1-9] documents.
>
>

I think you meant perldoc -q here.

--
Don Roby
droby@copyright.com

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 30 Dec 1998 17:33:28 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: An interesesting? problem....
Message-Id: <76do58$fsm$1@client3.news.psi.net>

Jim Matzdorff (syran@best.com) wrote on MCMXLVI September MCMXCIII in
<URL:news:76b8cq$cs7$1@shell18.ba.best.com>:
++ I have a problem here at work that I was wondering if anyone may have thoughts on.
++ 
++ I have an string (suspiciously like an ip address) such as:
++ 
++ 10(4).3.4(2).2(2)
++ 
++ I need to get every combination of ip address out of that, assuming the number in parens
++ are number of addtions to that particular part of the ip address.  For instance, the string
++ above would (hopefully) get expanded to:
++ 
++ 10.3.4.2
++ 10.3.4.3
++ 10.3.4.4
++ 10.3.5.2
++ 10.3.5.3
++ 10.3.5.4
++ .and so on...
++ 14.3.6.2
++ 14.3.6.3
++ 14.3.6.4
++ 
++ ALL the iterations and possible combinations.
++ 
++ I was able to get one iteration done (which was easy, obviously), but attepting to get every
++ iteration is proving to be a little difficult.  I almost think this requires recursion of some
++ type, but my abilities in that area (or this) are limited.

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

my $thingy = '10(4).3.4(2).2(2)';
my @out = ("");

map {@out = map {my $new = $_; map {length () ? "$_.$new" : $new} @out} @$_}
     map {/(\d+)(?:\((\d+)\))?/; [$1 .. ($1 + ($2 || 0))]} split /\./, $thingy;

$" = "\n"; print "@out\n";

__END__



Abigail


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

Date: Wed, 30 Dec 1998 19:58:39 GMT
From: mt@dev.null (Mads Toftum)
Subject: Re: Apache/mod_perl request handlers and cookies
Message-Id: <368a85bc.21987512@news.inet.tele.dk>

On Wed, 30 Dec 1998 16:36:18 GMT, joshaugh@uk.oracle.com (Jamie
O'Shaughnessy) wrote:

>
>How do you set cookies from a mod_perl request handler, e.g.

Take a look at:
http://www.modperl.com/chapters/ch6.html#Cookie_Based_Access_Control


vh

Mads Toftum, QDPH
som pe USENET reprfsenterer sig selv og ingen andre.


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

Date: 30 Dec 1998 12:52:08 -0600
From: "Nader Hindo" <nader@180.net>
Subject: APR Calculator
Message-Id: <WCui2.3980$re.1054473@newscene.newscene.com>

does anybody know where I can get a freebie script that does the APR (or the
Internal Rate of Return).

Thank you,

Happy New Year.

nader@180.net




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

Date: Wed, 30 Dec 1998 17:23:20 GMT
From: Darrin Edwards <d-edwards@nospam.uchicago.edu>
Subject: Re: C++ new to new(nothrow)
Message-Id: <tgaf055yt3.fsf@noise.bsd.uchicago.edu>

marin7@my-dejanews.com writes:

> I am switching to a new C++ compiler that conforms to the C++ ANSI
> standard.  On failure, the new operator now throws an exception
> unless you specify new(nothrow).  I need to change new to new(nothrow)
> in over 1000 C++ source files.
> Anybody have a Perl script that will only change the operator new to
> new(nothrow) in C++ source code.  Thank you

perldoc perlre.  HTH.

Darrin


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

Date: 30 Dec 1998 13:33:27 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Can Perl read/load Windows clipboard?
Message-Id: <76drln$1uq@panix.com>

In <368a5228.0@news2.uswest.net> "Dave Ressler" <daven@nettenna.com> writes:

>I'd like to read the clipboard contents and/or load it with text. Is this
>possible in a Perl script> How?

With a Perl Module, perhaps?

    Win32::Clipboard 

    http://www.divinf.it/dada/perl/

    A (little) module that allows you to read and set the contents 
    of the Windows Clipboard in Perl. 

-- 
Clay Irving
clay@panix.com


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

Date: 30 Dec 1998 18:04:09 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: EXPERIENCED IN PERL ?
Message-Id: <76dpup$d3$1@gellyfish.btinternet.com>

On Tue, 29 Dec 1998 17:04:38 -0500 Erik van Roode <newsposter@cthulhu.demon.nl> wrote:
> I am looking for work, but I don't think I'm interested in adapting
> to a tremendous amount of existing code. 

Nah, thats what the game is all about.  We all do that kind of stuff.

/J\
-- 
Jonathan Stowe <jns@btinternet.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: Wed, 30 Dec 1998 13:30:55 -0600
From: Mike <support@counter.w-dt.com>
Subject: Flock not working Can't figure out why!
Message-Id: <368A7F6D.3875AEEF@counter.w-dt.com>

My flock isn't working in my program. It appears to work, doesn't give
any errors or anything but occassionally it still fails and prints a
file with nothing in it. It is suppose to keep the count of the total
visitors each day and then the total visitors, but the numbers allways
gets deleted and its basically worthless. Thanks for your help.
$adstats = "/usr/local//httpd/cgi-bin/mike/count.txt";
sub lockexc {
flock($handle,2);
seek($handle, 0, 2);
}
sub lockshare {
flock($handle,1);
}
$handle = "ADSTATS";
open ($handle, "$adstats") || &erroropen;
&lockshare;
@lines = <$handle>;
close ($handle);
foreach $line (@lines) {
 chop ($line) if ($line =~ /\n$/);
}

($suncount, $sundate, $moncount, $mondate, $tuecount, $tuedate,
$wencount, $wendate, $thucount, $thudate, $fricount, $fridate,
$satcount, $satdate, $totalcount, $totaldate) = @lines;
   @days =
('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

   @months = ('January','February','March','April','May','June','July',
       'August','September','October','November','December');
   ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
   if ($hour < 10) { $hour = "0$hour"; }
   if ($min < 10) { $min = "0$min"; }
   if ($sec < 10) { $sec = "0$sec"; }
$year = (1900 + $year);
$thedate = "$days[$wday], $months[$mon] $mday, $year";
if ($totaldate eq "") {
$totaldate = "$thedate"; }
$totalcount += "1";
if ($wday eq "0") {
if ($sundate eq "$thedate") {
$suncount += "1"; }
else {
$sundate = "$thedate";
$suncount = "1"; } }
if ($wday eq "1") {
if ($mondate eq "$thedate") {
$moncount += "1"; }
else {
$mondate = "$thedate";
$moncount = "1"; } }
if ($wday eq "2") {
if ($tuedate eq "$thedate") {
$tuecount += "1"; }
else {
$tuedate = "$thedate";
$tuecount = "1"; } }
if ($wday eq "3") {
if ($wendate eq "$thedate") {
$wencount += "1"; }
else {
$wendate = "$thedate";
$wencount = "1"; } }
if ($wday eq "4") {
if ($thudate eq "$thedate") {
$thucount += "1"; }
else {
$thudate = "$thedate";
$thucount = "1"; } }
if ($wday eq "5") {
if ($fridate eq "$thedate") {
$fricount += "1"; }
else {
$fridate = "$thedate";
$fricount = "1"; } }
if ($wday eq "6") {
if ($satdate eq "$thedate") {
$satcount += "1"; }
else {
$satdate = "$thedate";
$satcount = "1"; } }
$handle = "ADSTATS";
open ($handle, ">$adstats") || &erroropen;
&lockexc;
print $handle ("$suncount\n");
print $handle ("$sundate\n");
print $handle ("$moncount\n");
print $handle ("$mondate\n");
print $handle ("$tuecount\n");
print $handle ("$tuedate\n");
print $handle ("$wencount\n");
print $handle ("$wendate\n");
print $handle ("$thucount\n");
print $handle ("$thudate\n");
print $handle ("$fricount\n");
print $handle ("$fridate\n");
print $handle ("$satcount\n");
print $handle ("$satdate\n");
print $handle ("$totalcount\n");
print $handle ("$totaldate\n");
close ($handle);
}




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

Date: Wed, 30 Dec 1998 13:26:15 -0500
From: Thomas Gambini <tgambini@wfubmc.edu>
Subject: Re: Getting error with "chomp"
Message-Id: <368A7047.35B59758@wfubmc.edu>

     I think it is chop($name);

Matthew Bafford wrote:

> In article <36767ED0.437805D4@mindspring.com>, lansink@mindspring.com
> says...
> => Hello.  Obviously I'm very new at this but here goes anyway.
>
> Hello!
>
> => I'm using the standard "Learning Perl" (llama) book and am only on page
> => 6 and already have a problem.  I'm getting an error at the "chomp" line
> => in the following code.  The script works fine when this line is
> => commented out (aside from the embedded \n that chomp is supposed to
> => remove!
> =>
> => Thanks in advance for help on this silly question.
>
> It's not silly.
>
> => #!/usr/bin/perl -w
> => print "What is your name? ";
> => $name = <STDIN>;
> => chomp ($name);
> => print "Hello, $name!\n";
>
> *** Perl 4 alert!  Perl 4 alert!  Perl 4 alert!  Perl 4 alert! ***
>
> Do a perl -v, and see what you get.  If it reports the version as 5.*,
> come back.  Otherwise, upgrade. :)
>
> HTH!
>
> => Jeff Lansink
>
> --Matthew



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

Date: Wed, 30 Dec 1998 14:53:24 -0500
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: Getting error with "chomp"
Message-Id: <MPG.10f44ebc79a5738b989770@news.scescape.net>

In article <368A7047.35B59758@wfubmc.edu>, tgambini@wfubmc.edu says...
=>      I think it is chop($name);
[snip me saying chomp was Perl 5+ specific]

It is, and it is.

In most cases chop is a reasonable replacement for chomp.  However, they 
do two different jobs, and are not totally interchangeable.

--Matthew


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

Date: 30 Dec 1998 19:12:49 GMT
From: "LSILes" <les@livingscriptures.com>
Subject: I NEED HELP!  =-)
Message-Id: <01be3427$c8b7a500$6887e4cc@Les>

I'm working on a project, and I've discovered that Perl would be very
helpful in completing it.  Well, I need to install it on our SCO UNIX
system.  Please, if anyone can help me with this, I'd REALLY appreciate it.
 I need to know where I can get a copy of it (I think www.perl.com has it),
and how to install it on our system.  PLEASE, PLEASE, PLEASE help this
wandering soul!!!  I've actually downloaded what I thought was it at
www.perl.com, but I'm not sure how to install it, so...   thanks all.

---Les Buchanan
les@livingscriptures.com

p.s.  I know I shouldn't ask, but if you could e-mail me to let me know
that you've responded (and maybe sent me a CC of the response), that would
be GREAT!



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

Date: 30 Dec 1998 19:01:32 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Is there a way to read incoming mail on a win32 box??
Message-Id: <76dtac$er$1@gellyfish.btinternet.com>

On Wed, 30 Dec 1998 15:45:17 GMT qvanegeren@frxsoft.com wrote:
> I am trying to find a way to run a perl program, or better yet have one
> running as a process on my Windows 95 box, that will parse incoming e-mails. 
> I know that I can SEND e-mails using PERL, but is there a way to read them
> also?  Any help would be greatly appreciated...
> 

You can use the Net::POP3 module available from CPAN (as part of the libnet
bundle ) to do this.

/J\
-- 
Jonathan Stowe <jns@btinternet.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: Wed, 30 Dec 1998 13:26:05 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: LinkExtor
Message-Id: <comdog-ya02408000R3012981326050001@news.panix.com>

In article <368A3E20.A04CC4C3@xs4all.nl>, Frank de Bot <debot@xs4all.nl> posted:

> Which Documentation??

the module docuementation.

   perldoc HTML::LinkExtor

but perhaps you are trolling.

> brian d foy wrote:
> 
> > In article <368A02AC.7B039DFD@xs4all.nl>, Frank de Bot <debot@xs4all.nl> posted:
> >
> > > Can someone give me a simple example how to use: HTML::LinkExtor  ?
> >
> > see the documentation for examples.

-- 
brian d foy                     <brianNOSPAM@NOSPAM.smithrenaud.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
remove NOSPAM or don't.  it doesn't matter either way.


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

Date: Wed, 30 Dec 1998 20:41:46 +0100
From: Frank de Bot <debot@xs4all.nl>
Subject: Re: LinkExtor
Message-Id: <368A81FA.41C9F8C6@xs4all.nl>

I've found the documentation, but the example doesn't work.
I just need an examples that does work.



brian d foy wrote:

> In article <368A3E20.A04CC4C3@xs4all.nl>, Frank de Bot <debot@xs4all.nl> posted:
>
> > Which Documentation??
>
> the module docuementation.
>
>    perldoc HTML::LinkExtor
>
> but perhaps you are trolling.
>
> > brian d foy wrote:
> >
> > > In article <368A02AC.7B039DFD@xs4all.nl>, Frank de Bot <debot@xs4all.nl> posted:
> > >
> > > > Can someone give me a simple example how to use: HTML::LinkExtor  ?
> > >
> > > see the documentation for examples.
>
> --
> brian d foy                     <brianNOSPAM@NOSPAM.smithrenaud.com>
> CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
> remove NOSPAM or don't.  it doesn't matter either way.



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

Date: 30 Dec 1998 18:25:02 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: LinkExtor
Message-Id: <76dr5u$eg$1@gellyfish.btinternet.com>

On Wed, 30 Dec 1998 15:52:17 +0100 Frank de Bot <debot@xs4all.nl> wrote:
> brian d foy wrote:
> 
>> In article <368A02AC.7B039DFD@xs4all.nl>, Frank de Bot <debot@xs4all.nl> posted:
>>
>> > Can someone give me a simple example how to use: HTML::LinkExtor  ?
>>
>> see the documentation for examples.
>>
> 
> Which Documentation??
> 

The documentation that looks like:


NAME
       HTML::LinkExtor - Extract links from an HTML document

SYNOPSIS
        require HTML::LinkExtor;
        $p = HTML::LinkExtor->new(\&cb, "http://www.sn.no/");
        sub cb {
            my($tag, %links) = @_;
            print "$tag @{[%links]}\n";
        }
        $p->parse_file("index.html");


And which (on my system) can be obtained by typing :

$ man HTML::LinkExtor

Of course you might be on another type of system and thus you can type :

C:\> perldoc HTML::LinkExtor


Any good module will have a sufficiency of documentation with it to make a
start.  

/J\
-- 
Jonathan Stowe <jns@btinternet.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: 30 Dec 1998 12:22:09 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Logging out
Message-Id: <76d5th$a0$1@gellyfish.btinternet.com>

On Wed, 30 Dec 1998 04:11:06 GMT rsarcomo@my-dejanews.com wrote:
> Is there a way to logout from a perl script?  I've tried
> system("logout"),system("exit"),exec("logout"), and exec("exit") to no avail.
>  I want the script to log out after it's done running.	Thanks.

You're coming at this from the wrong angle - you actually need to *invoke* the
program in such a way that it will log out when it completes.

You could try doing:

$ exec myperlprogram.pl

at the shell prompt - this will run your program in place of the shell and 
thus will 'logout' when the program trminates.

/J\
-- 
Jonathan Stowe <jns@btinternet.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: Wed, 30 Dec 1998 20:30:26 +0100
From: R. A. Larsen <r_larsen@image.dk>
Subject: Re: LWP, getstore
Message-Id: <VA.00000094.001615ba@octo>

"Manual Labor" <mlabor@sprintmail.com> wrote:
> I am trying to download the following file -- wotw.zip.
> 
> This code:
> 
>     use LWP::Simple;
>     getstore
> ("ftp://ftp.gamepower.com/pub/gamepower/mame/wotw.zip","wotw.zip");
> 
> does not give any errors, but it also doesn't download the file

Do you have to use a username and password when you connect to 
ftp.gamepower.com? If so, where are you specifying it?

Hint: look at 'perldoc lwp' and look for 'FTP Requests'

Perhaps it would help a little if you checked the return code of 
getstore() :) Here is a revised version of your code:

  use LWP::Simple;
  use HTTP::Status;

  $rc = getstore("ftp://ftp.gamepower.com/pub/gamepower/mame/wotw.zip", 
"wotw.zip");
  if ($rc != RC_OK) {
    print status_message($rc), "\n";
  }

Now you at least have a chance to see why it fails.

> thanks for any help

I hope this helps.

Reni
-- 
Using Virtual Access
http://www.vamail.com



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

Date: Wed, 30 Dec 1998 16:50:33 GMT
From: patrick@cre8tivegroup.com
Subject: Re: Modules and Mysql
Message-Id: <76dlkp$v09$1@nnrp1.dejanews.com>


> Is there a reference on how to manipulate Mysql databases with PERL?  I know I
> can use:
>
> use dbi; or
> use Mysql;
>
> modules but is there a reference as to what I can do?  Sort of like CGI.pm?

The easiest way is to do:

perldoc DBI
and
perldoc DBD::mysql

Those should answer your general questions and most of your specifics.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 30 Dec 1998 13:27:45 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Modules and Mysql
Message-Id: <comdog-ya02408000R3012981327450001@news.panix.com>

In article <76dgi7$qmg$1@nnrp1.dejanews.com>, lefkogt.xp@usafa.af.mil posted:

> Is there a reference on how to manipulate Mysql databases with PERL?  I know I
> can use:
> 
> use dbi; or
> use Mysql;
> 
> modules but is there a reference as to what I can do?  Sort of like CGI.pm?

see the DBI module documentation as well as the Mysql documentation (which
has a Perl section).

-- 
brian d foy                     <brianNOSPAM@NOSPAM.smithrenaud.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
remove NOSPAM or don't.  it doesn't matter either way.


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

Date: 30 Dec 1998 16:58:24 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl Cookbook
Message-Id: <76dm3g$fc0$1@client3.news.psi.net>

Mike Stillman (mikebvc@ripco.com) wrote on MCMXLVI September MCMXCIII in
<URL:news:76b8ad$p83$1@gail.ripco.com>:
++  Kevin W. Reed wrote in message <366bfbcf.0@news.redrose.net>...
++  >The Perl Cookbook from O'Reilly is pretty good.  Just got it for a
++  >B-Day... Lots of solutions in it....
++ 
++ Lots of errors, too. Check the O'Reilly website for a list of errata that
++ runs 25+ pages.


That's less that Knuth has for his TAoCP books. Of course, just like the
PCB, many of his errata have to do with spelling, layout and other non-
technical nitpicking.



Abigail


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

Date: 30 Dec 1998 18:56:50 GMT
From: mjd440@aol.com (Mjd440)
Subject: Re: Perl on NT - How to run as a daemon process
Message-Id: <19981230135650.01056.00003721@ng-cd1.aol.com>

Hi Adrian,

I can't recall the exact name of the utility in the NT Resource Kit, but
there's a util called something like NTSERVANY which will run your batch job as
an NT service.  You can use SERVMON (another NT Reskit util) that monitors
remote services to keep tabs on your job.  You could also take off the
interactive flag off the AT job.... that'll keep the job on the schedule, but
it won't run in the foreground so people won't muck with it.     Good luck...

-- Mark


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

Date: Wed, 30 Dec 1998 12:45:02 -0500
From: "Stephen Craft" <stephen.craft@mail.tju.edu>
Subject: Perl Win32 and ODBC?
Message-Id: <76dopr$5d3$1@elmo.tju.edu>

I am looking to extract ODBC-based data using Perl for Win32.
I was wondering if anyone could point me in the right direction,
throw me a code sample to mess with, anything.  I am an extreme
newbie in this situation.

Thanks if you can help.





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

Date: Wed, 30 Dec 1998 16:21:58 +0530
From: "Tojo" <Tojo.Punnoose@Blr.Sni.De>
Subject: Perl, Netscape and Internet Explorer...:(
Message-Id: <76d0hg$19t$1@linus.sni.de>

Hi,

I have a HTML Form page where, I have put some text fields , radio buttons
and all. And there is a Submit button, which will execute a Perl script and
will send a mail to me. This page is working fine Internet Explorer3.0 to
IE5.0.

But when I use Neescape, instead of ececuting the Perl script, it tries to
download
( 

I am using Microsoft Peer Web Server on my machine.

Someone Please help me......

Tojo.

mailto:tojo.punnoose@blr.sni.de





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

Date: 30 Dec 1998 19:48:16 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Perl, Netscape and Internet Explorer...:(
Message-Id: <76e020$358$1@news.NERO.NET>

In article <76d0hg$19t$1@linus.sni.de>, Tojo <Tojo.Punnoose@Blr.Sni.De> wrote:
>Hi,
>I am using Microsoft Peer Web Server on my machine.
>
>Someone Please help me......

I suggest one of the many microsoft.* newsgroups, preferrably one that
deals with their web server.



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

Date: Wed, 30 Dec 1998 17:21:09 GMT
From: toffie@my-dejanews.com
Subject: Re: Perl--sql--win32--command???
Message-Id: <76dne3$gl$1@nnrp1.dejanews.com>

In article <36894DC2.F01CBBE6@hotmail.com>,
  Damoi <damoi985@hotmail.com> wrote:
> I have a base named: Data
> consist of two tables: One and Two
> Table one has three fields: Name, Number and City
>
> What would be the sql command to add a value (let's say: '2') straigth
> into the Number-field in Table One of Data??????
>
> I keep getting the error that a constant can't be changed and it drives
> me nuts by now.
>
> I am using an Access Database over NET::ODBC Perl.....
> but I am interested in the command to increase the integer value of the
> field Number only.
>
> Thanks a zil.
>
Did a quick test with the MSAccess driver and ODBCTest:

If I created the table as follows (name and city are character values with a
max length of 10, num is an integer value):
     create table one (Name char(10), Num integer, City char(10))
and inserted the following values into the table:
     insert into one values ('sofieke', 12, 'LA')
and incremented the num column by 2 with the condition that the name field
should contain the character value 'sofieke' (otherwise all the records would
be incremented by two..)
     update one set num=num+2 where name='sofieke'
the contents of the table was:
"sofieke   ", 14, "LA        "

Toffie.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 30 Dec 1998 18:23:47 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: perldocs in print?
Message-Id: <Tcui2.2091$J4.438619@news.shore.net>


Robert Gwynne <nospam_gwynne@utkux.utk.edu> wrote:
: Why not use your browser to access the HTML version and print the pages that
: you want. They would be less expensive than a book, would be the specific
: ones you want, and would be easy to pack in a suitcase.

Yabbut, that wouldn't really serve him if he wants something to browse
through while he's killing time at his in-laws'.

Depending on where you live, I would think you could get a copy shop like
Kinko's to print and bind a copy from the postscript file. I suppose
someone with the gear to do that themselves could offer bound copies of
the docs on the web as a "public service" (for some nominal fee), but it's
probably not a high-profit enterprise. I'd say you'd be best off doing it
yourself or buying Programming Perl and/or the Perl Cookbook and bringing
those.  The Cookbook in particular is good for random-access browsing.

--Art


: Bob Gwynne

: Bill Moseley <moseley@best.com> wrote in message
: news:36891b6e$0$9750@nntp1.ba.best.com...
:>Does anyone publish the perl docs and current faqs?  As much as I like the
:>on-line docs, it would be nice to have a printed version for when I'm not
:>on-line.  For example, a perfect time for such exciting reading would be
:>for my upcoming trip to the in-laws ;-).
:>
:>I looked at the Perl Resource Kit, but is really more than I'm looking for.
:>
:>Wish me luck.
:>
:>
:>--------------
:>Bill Moseley
:>moseley@best.com
:>



-- 
--------------------------------------------------------------------------
                    National Ska & Reggae Calendar
            http://www.ziplink.net/~upsetter/ska/calendar.html
--------------------------------------------------------------------------

While you're spamming me, don't forget to include these guys:
Chairman Reed Hundt: rhundt@fcc.gov Comm. James Quello: jquello@fcc.gov
Comm. Susan Ness: sness@fcc.gov   Comm. Rachelle Chong:  rchong@fcc.gov
US Postal Service: customer@email.usps.gov Fraud Watch: fraudinfo@psinet.com
Federal Trade Commission: consumerline@ftc.gov

Oh, and while you're at it,  pound some sand too!
admin@loopback  $LOGIN@localhost  $LOGNAME@localhost  $USER@localhost
$USER@$HOST -h1024@localhost root@mailloop.com


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

Date: Wed, 30 Dec 1998 17:28:04 GMT
From: chad@vcn.net
Subject: Please help will generating biased random numbers.
Message-Id: <76dnr2$s2$1@nnrp1.dejanews.com>




Hi,

Ok ... I've read the perlcook book concerning this and the doc on
Math::Random, 'randdom_uniform_integer()' and I still can't seem to get it. 
Can someone please put this in simple terms for me.  Of course what I want to
do is randomly pick a banner based on weighted values (and I don't even
really know what that means).  Can some one point me in the right direction?

-chad

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 30 Dec 1998 09:25:40 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: random number problem
Message-Id: <m1vhitsfsb.fsf@halfdome.holdit.com>

>>>>> "Justin" == Justin  <jjpark@home.com> writes:

Justin> i'm trying to get 10 random numbers between 0-50
Justin> and i want all 10 random numbers to be different numbers
Justin> so how do i make sure they are not same?

It doesn't get much simpler than this:

    @deck = 0..50;
    for (1..5) {
	    push @cards, splice @deck, rand(@deck), 1;
    }

print "Just another Perl hacker,"

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

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


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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 V8 Issue 4519
**************************************

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