[7983] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1609 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 9 14:07:24 1998

Date: Fri, 9 Jan 98 11:01:50 -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           Fri, 9 Jan 1998     Volume: 8 Number: 1609

Today's topics:
     Re: Perl to EXE <jdporter@min.net>
     Re: Perl to EXE (Joe Casadonte)
     Perl5 + NT + ODBC + CGI <volker.doerrsam@mach.uni-karlsruhe.de>
     Re: Searching text file with perl <mgm@gxn.net>
     Re: serious post about gmtime and year-1900 (was Re: Pe (John Moreno)
     Re: serious post about gmtime and year-1900 (was Re: Pe <Russell_Schulz@locutus.ofB.ORG>
     Re: serious post about gmtime and year-1900 (was Re: Pe <Russell_Schulz@locutus.ofB.ORG>
     Re: serious post about gmtime and year-1900 (was Re: Pe <Russell_Schulz@locutus.ofB.ORG>
     Re: serious post about gmtime and year-1900 (was Re: Pe (Chris Nandor)
     Re: Simple string length tobez@plab.ku.dk
     Re: Simple string length <sgordon@athena.lbl.gov>
     Re: Solution Re: Help with passing parameters in URL's  (brian d foy)
     Re: Telnet client written in perl <mgm@gxn.net>
     Re: Win32::Eventlog Read Method (Gurusamy Sarathy)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Fri, 09 Jan 1998 11:04:47 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Perl to EXE
Message-Id: <34B64A9F.56E2@min.net>

Russ Allbery wrote:
> 
> James Cherry <James.Cherry.0504266@nortel.ca> writes:
> 
> > Program's called "undump". Platform specific. use Perl -u to gen the
> > core file, but you must have a specially linked version of perl or
> > undump will not work on some platforms.
> 
> ...like pretty much any operating system released within the last five
> years.

Yes, actually, any OS which supports an "executable memory image file"
should be able to do this trivially.  DOS and CP/M  come to mind...


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

Date: 9 Jan 1998 18:22:32 GMT
From: joc@netaxs.com (Joe Casadonte)
Subject: Re: Perl to EXE
Message-Id: <695pt8$7o7@netaxs.com>

Robert A. Thompson (stdrat01@unx1.shsu.edu) wrote:
> I have seen a program on the web once that will convert a perl script to
> an .exe If anyone knows where I may find this could they please let me
> know.

You can link to it from my PerlWin32 page:

	http://www.netaxs.com/~joc/perlwin32.html

Regards,


joe
joc@netaxs.com

------------------------------------------------------------------------------
       Llama Fresh Farms => http://www.netaxs.com/~joc
 Gay Media Resource List => http://www.netaxs.com/~joc/gaymedia.html
          Perl for Win32 => http://www.netaxs.com/~joc/perlwin32.html
       PerlRing Homepage => http://www.netaxs.com/~joc/perlring.html
------------------------------------------------------------------------------
                       Live Free, that's the message!
------------------------------------------------------------------------------


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

Date: Fri, 09 Jan 98 17:42:47
From: "Volker" <volker.doerrsam@mach.uni-karlsruhe.de>
Subject: Perl5 + NT + ODBC + CGI
Message-Id: <eruzmqqcfulvwcsbeiuoap.pminews@ifk47>

Hi all,
After surfing around in the CPAn archive and links provided on
http://www.perl.com I am a little bit confused in choosing the right bundle
a/o modules to deals with this problem.
I'm experienced in programming perl5 on DIGITAL-Unix but using modules on a
Wintel platform is an unkown land for me.

I'd like to write a server-program communicating on the one side with
http-clients (5 .. 100 connections/hour) on the other side it should be able
to:
a) store/retrieve information to/from a DBMS via ODBC 
b) trigger/retrieve programs on a (remote) Application server

The OS the server will be running on is Win-NT 4.0.

Now the questions:
1. Which it better regarding: performance and security 
writing my own (perl-based) httpd in order to communicated with the clients?
OR
writing CGI-scripts and using IS4.0?

2. Since I need access to both DBMS "SybaseSQLanywhere" AND  "Informix" via
OBDC I don't know wether to take the perl5 bundle from Activeware or building
everything e.g. perl5.004 from scratch. Which one is the better way?

I'd apprciate any hint 

ciao
-Volker




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

Date: 9 Jan 1998 17:52:51 GMT
From: "Mark Morgan" <mgm@gxn.net>
Subject: Re: Searching text file with perl
Message-Id: <01bd1d27$c7622530$86507ec2@simont>

Or, if you would prefer to use an array, you could do something like:

>perl -le '@a=qw(abbb bbb aaa abb abbbc bbbbbb); @b= grep /bbb/, @a; print
"@b"'

abbb bbb abbbc bbbbbb
 ....

or, if you're really masochistic, save the page to a text file, then use
system "grep bbb file"; :)

Mark.

Clay Irving <clay@panix.com> wrote in article <695bqp$2be@panix.com>...
> In <884175871.1373503501@dejanews.com> ecsspear@livjm.ac.uk writes:
> 
> >I am trying to get a perl script that will search a text file on the web
> >for a keyword then return that part of the text file with the results.
> 
> >Eg - I am searching a list of e-mail addressess for the keyword 'brian'
-
> >I expect it to return
> 
> >brian@wibble.com
> >g.rbrian@smith.com
> >pete@briany.com
> 
> >etc
> >etc
> 
> >Does anyone know how I can do this - I have tried botching site search
> >scripts but they all just return file names :(
> 
> Eh?
> 
> Could it be a simple as:
> 
>   #!/usr/local/bin/perl5.00403 -w
>   
>   while (<DATA>) {
>     chomp;
>     if (/brian/) {
>       print "I found \"brian\" in this: $_\n";
>     }
>   }
>   
>   __DATA__
>   clay@panix.com
>   joe_schmo@frobwitz.com
>   brian@wibble.com
>   g.rbrian@smith.com
>   pete@briany.com
>   president@whitehouse.gov
>   
> The program prints:
> 
>   I found "brian" in this: brian@wibble.com
>   I found "brian" in this: g.rbrian@smith.com
>   I found "brian" in this: pete@briany.com
> -- 
> Clay Irving <clay@panix.com>                  I think, therefore I am. I
think? 
> http://www.panix.com/~clay/
> 


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

Date: Fri, 9 Jan 1998 12:48:25 -0500
From: phenix@interpath.com (John Moreno)
Subject: Re: serious post about gmtime and year-1900 (was Re: Perl not Y2K compliant)
Message-Id: <1d2l97l.1y9lacy10uyou9N@roxboro-180.interpath.net>

Russell Schulz <Russell_Schulz@locutus.ofB.ORG> wrote:

> chip@pobox.com writes:
> 
> >>it does all depend on the underlying C runtime supplying the correct
> >>number -- and we all know there are no errors in the C runtime, right?
> >
> > Well, the C runtime is an issue with your C compiler vendor, not
> > Perl's maintainers.
> 
> I don't understand:  if it's a C issue, people shouldn't test it?

You can test, but you need to keep it clear WHAT you are testing.  Perl
does the right thing (trust us), but what your local C library does is
beyond anybody except the people using it.

Putting code in the documentation to test your local runtime is beyond
the scope of the documentation.


-- 
John Moreno


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

Date: Fri, 9 Jan 1998 14:04:26 +0000
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: serious post about gmtime and year-1900 (was Re: Perl not Y2K compliant)
Message-Id: <19980109.140426.6l1.rnr.w164w@locutus.ofB.ORG>

pudge@pobox.com (Chris Nandor) writes:

>> I think he should submit a test script for this to be run at 'make test'
>> time.
>
> #y2k.t
> printf "%s 1\n", (
>   length(${[localtime(time()+315360000)]}[5]) == 3 ? 'ok' : 'not ok'
> );
>
> __END__

would people mind if I submitted this test script?  did you already, Chris?
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c


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

Date: Fri, 9 Jan 1998 14:00:39 +0000
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: serious post about gmtime and year-1900 (was Re: Perl not Y2K compliant)
Message-Id: <19980109.140039.1R4.rnr.w164w@locutus.ofB.ORG>

  [
    Tom, you should find software that indicates when you have mailed
    a copy of a post, or insert such an indication manually, as a
    courtesy to the people you're mailing.
  ]

Tom Phoenix <rootbeer@teleport.com> writes:

>> I think that instead of the perl documentation saying ``it will just
>> work, trust me'', 
>
> That's not what it says in my copy. 

I'd mailed Tom ``it's somewhere near the back'', a Simpsons joke.
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c


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

Date: Fri, 9 Jan 1998 14:05:43 +0000
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: serious post about gmtime and year-1900 (was Re: Perl not Y2K compliant)
Message-Id: <19980109.140543.9y8.rnr.w164w@locutus.ofB.ORG>

chip@pobox.com writes:

>>> Well, the C runtime is an issue with your C compiler vendor, not
>>> Perl's maintainers.
>>
>> Yes but he'd still like to see some code in the documentation so that
>> you can check if perl's reliance on the underlying C is wise.
>
> That's silly.  Anyone who's got Y2K issues has to test their C runtime
> anyway, whether or not they're using Perl.

I missed that part in the license where you're forbidden to run perl
someone else compiled, or that you didn't recompile each time you got
a new version of the C runtime.

they _are_ independent issues.
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c


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

Date: Fri, 09 Jan 1998 13:40:08 -0500
From: pudge@pobox.com (Chris Nandor)
Subject: Re: serious post about gmtime and year-1900 (was Re: Perl not Y2K compliant)
Message-Id: <pudge-0901981340080001@ppp-32.ts-1.kin.idt.net>

In article <19980109.140426.6l1.rnr.w164w@locutus.ofB.ORG>, Russell Schulz
<Russell_Schulz@locutus.ofB.ORG> wrote:

# pudge@pobox.com (Chris Nandor) writes:
# 
# >> I think he should submit a test script for this to be run at 'make test'
# >> time.
# >
# > #y2k.t
# > printf "%s 1\n", (
# >   length(${[localtime(time()+315360000)]}[5]) == 3 ? 'ok' : 'not ok'
# > );
# >
# > __END__
# 
# would people mind if I submitted this test script?  did you already, Chris?

As the Disney song goes, Be my guest ...

--
Chris Nandor               pudge@pobox.com           http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==                    MacPerl: Power and Ease                     ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#


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

Date: Fri, 09 Jan 1998 18:55:29 +0100
From: tobez@plab.ku.dk
Subject: Re: Simple string length
Message-Id: <34B66491.48D5@plab.ku.dk>

John Porter wrote:

> >     $cnt = $string =~ tr/0-9//; # count the digits in $string
> Ok, but why destroy the string?  Replace each digit with itself:
> 
>       $cnt = $string =~ tr/0-9/0-9/;

No need to.  To destroy the string you've got to use tr/0-9//d;

Anton.


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

Date: Fri, 09 Jan 1998 10:32:31 -0800
From: Shawn Gordon <sgordon@athena.lbl.gov>
Subject: Re: Simple string length
Message-Id: <34B66D3F.AE501BFF@athena.lbl.gov>

Geoffrey Conner wrote:
> 
> Hi, I am new to Perl and am trying to do something similar to strlen in
> C.  

$length = length($string);

shawn


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

Date: Fri, 09 Jan 1998 13:18:30 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Solution Re: Help with passing parameters in URL's please
Message-Id: <comdog-0901981318300001@news.panix.com>
Keywords: just another new york perl hacker

In article <695feh$icv$1@usenet40.supernews.com>, "Vaughn Fox" <vfox@nbnet.nb.ca> posted:

> You'd have to increment the filena~1 to filena ~2 same as you would with
> DOS.

what happens if you have 11 such files? :)

-- 
brian d foy                                 <http://computerdog.com>


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

Date: 9 Jan 1998 17:54:15 GMT
From: "Mark Morgan" <mgm@gxn.net>
Subject: Re: Telnet client written in perl
Message-Id: <01bd1d27$f925b550$86507ec2@simont>

Or IO:Expect.  I found that between the two of these, I've not even touched
expect for weeks now(as that's about when I learned about IO:Expect :)

Mark.


I R A Aggie <fl_aggie@thepentagon.com> wrote in article
<fl_aggie-0901980956330001@aggie.coaps.fsu.edu>...
> In article <34B4DFDD.7900@fccj.cc.fl.us>, bill@astro.fccj.cc.fl.us wrote:
> 
> + Will this Telnet client need to operate independently of it's
> + user/program?
>  
> + If so, then I would recommend looking at http://expect.nist.gov
> 
> Ummm...why? I would recommend the perl module Net::Telnet.
> 
> James
> 
> -- 
> Consulting Minister for Consultants, DNRC
> The Bill of Rights is paid in Responsibilities - Jean McGuire
> To cure your perl CGI problems, please look at:
> <url:http://www.perl.com/perl/faq/idiots-guide.html>



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

Date: 9 Jan 1998 18:44:54 GMT
From: gsar@engin.umich.edu (Gurusamy Sarathy)
Subject: Re: Win32::Eventlog Read Method
Message-Id: <695r76$p2b@srvr1.engin.umich.edu>

  [ mailed and posted ]

In article <34B2AAFD.5223@administaff.com>,
Shirley McCraw  <shirley_mccraw@administaff.com> wrote:
>I am trying to read the system eventlog on a NT 4.0
>server using the Perl-Win32 extensions. However,
>the Read method always fails.  My test code
>segment is listed below.  Does anyone have
>a code sample that works?
>
>use Win32::Eventlog;
                 ^
Make that   EventLog
(Perl is case-sensitive!)

>my $myLog, $number;
>Win32::EventLog::Open($myLog,"System",'') || die $!;
>$myReadFlags = EVENTLOG_FORWARDS_READ;
                                      ^
Add                                   | EVENTLOG_SEEK_READ
(which seems to be always required, haven't investigated why)

>$myCount = 1;
>$myLog->Read($myReadFlags,$myCount,\%list) || die ;
                                    ^^
Make that a simple scalar            $list
(EventLog is rather bone-headed in setting the output arg,
I've fixed it for the next libwin32.)

>print "key = value\n";
>foreach $key (keys %list)

                    %$list

>{ 
>print $key, '=', $list{$key}, "\n";
>}
                  $list->{$key}

 - Sarathy.
   gsar@umich.edu


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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 V8 Issue 1609
**************************************

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