[6412] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 37 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 2 15:07:20 1997

Date: Sun, 2 Mar 97 12:00:23 -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           Sun, 2 Mar 1997     Volume: 8 Number: 37

Today's topics:
     `FILNAME` accesses floppy drive before current drive (Kevin Posen)
     Re: `FILNAME` accesses floppy drive before current driv (Nathan V. Patwardhan)
     Re: advice needed (Tad McClellan)
     Re: advice needed (Jon Bell)
     Announce: ALPHA copy of MIME::Lite is now online <eryq@enteract.com>
     ANNOUNCE: Font::TFM, TeX::DVI, TeX::Hyphen, all 0.03 (Honza Pazdziora)
     Re: class inheritance problem with autoload (Honza Pazdziora)
     GetOpt::Regex updated to Version 0.02 <J.A.R.Williams@aston.ac.uk>
     Help!  Testing Perl CGI scripts on local Windows/DOS sy <GeoffW@wordsmith.demon.co.uk>
     HOW to set up alias to perl command in unix shell ? <josin@dimensional.com>
     Re: How to spam - legitimately <tchrist@mox.perl.com>
     Re: Inline subroutines? <merlyn@stonehenge.com>
     Re: Interview With The Internet's Wise Guys Of Perl - W <merlyn@stonehenge.com>
     Math::Trig Release 1.02 Update <J.A.R.Williams@aston.ac.uk>
     Math:VecStat 1.04 <J.A.R.Williams@aston.ac.uk>
     Re: NT/95 Registry ("John Dallman")
     parsing? (Matthew John Webster)
     perl 1st edition example in perl5 <jxg@redfox.mhv.net>
     Re: perl 1st edition example in perl5 (Nathan V. Patwardhan)
     Perl for Win3.11 <Y_Hu@fccc.edu>
     Re: Perl for Win3.11 (Chris Allen)
     Re: PerlIS+Win32::ODBC - Can't call method "Sql"... (Dirk Leas)
     Re: problems using bareword symbols (O_CREAT, etc) in p <tchrist@mox.perl.com>
     Re: sort by multiple keys? (Honza Pazdziora)
     Web download script..???? <sebast@hrnet.fr>
     Re: What's wrong with this Perl? <roderick@argon.org>
     Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)

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

Date: Sun, 02 Mar 1997 18:36:24 GMT
From: posenj@lancet.co.za (Kevin Posen)
Subject: `FILNAME` accesses floppy drive before current drive
Message-Id: <5fchc1$8ek@news1.saix.net>

Hello.

I'm using the line

	print `type poll.dat`;

through an MS-DOS shell on a Windows '95 platform PC
to display the contents of the file 'poll.dat'.

When the program is run, it accesses the floppy drive
and then displays the output, even though my current
drive is my hard disk drive.

How do I prevent the floppy disk access?

Thanks

Kevin Posen



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

Date: 2 Mar 1997 19:08:05 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: `FILNAME` accesses floppy drive before current drive
Message-Id: <5fcj6l$oar@fridge-nf0.shore.net>

Kevin Posen (posenj@lancet.co.za) wrote:

: I'm using the line

: 	print `type poll.dat`;

Ouch!

Why not try:

$file = 'path\\poll.dat';
open(FILE, "$file") || die("file error: $!");
while(<FILE>) {
   print $_;
}
close(FILE);

: How do I prevent the floppy disk access?

You don't if your program is quirky.  :-)  If you try opening the file
via a filehandle, I suspect that your results will be more desirable.

--
Nathan V. Patwardhan
nvp@shore.net
"Hello, good citizen.  I'm Batman.
Would you like to be my assistant?
Would you like to ride with me?
Would you like to ride with Batman?"


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

Date: Sun, 2 Mar 1997 07:49:19 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: advice needed
Message-Id: <vg0cf5.lj.ln@localhost>

kent (kc079@mdx.ac.uk) wrote:

: 	I am doing a research with the title "How Perl scripting makes a Web
: page interactive ?" and I need some advices from you all.

: 1) The O/S environment I am working with is Unix, do I need a server
: to run the Perl script ? 

You do not need a server to run Perl scripts.

You do need the perl compiler/interpreter installed though.

You _do_ however need an HTTP server to run CGI scripts.

Perl != CGI

Perl is a general purpose programming language. I used it for two years
and thousands of lines of code without ever using it for a CGI script.
I still today do about 90% of my perl programming for uses *other*
than CGI scripting.

It is very popular for writing CGI scripts but it is _not_ CGI...


: Can I run it on my PC ?

Yes.

'Course we would need to know what OS is on your PC. Win3.1, 95, NT,
OS/2, Linux...


: 2) Which editor in Unix should I use for writing Perl script ?

Any editor will do.

Let's not start that religious war again ;-)



: 3) What else do I  need and know in order to do the research ?

You need to get a handle on the difference between CGI and Perl.

"Perl scripting" doesn't really make a web page interactive. 
CGI scripting does. CGI scripts can be written in most any
language. Perl is often the language of choice, but you can
even write them in Bourne shell...


: Please advise and thanks in advace.


Also have a look at the copious information available at:

http://www.perl.com


For things specific to CGI scripting rather than to Perl, the 
appropriate newsgroup is:

comp.infosystems.www.authoring.cgi


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: Sun, 2 Mar 1997 14:50:28 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: advice needed
Message-Id: <E6F7w5.44H@presby.edu>

 kent <kc079@mdx.ac.uk> wrote:
>1) The O/S environment I am working with is Unix, do I need a server
>to run the Perl script ? Can I run it on my PC ?

Generically speaking, you can run perl scripts on any machine that has a 
perl interpeter.  However, if the script is to be run in connection with 
a Web page, it must run on the server, as a so-called "CGI script".  See 
the World Wide Web FAQ at http://www.boutell.com/faq/ for information 
about this.

>2) Which editor in Unix should I use for writing Perl script ?

Any editor you like.  Most of the time I use pico, which is about as 
simple an editor as you can get; but my scripts aren't usually very 
complex.

-- 
Jon Bell <jtbell@presby.edu>                        Presbyterian College
Dept. of Physics and Computer Science        Clinton, South Carolina USA
[for beginner's Usenet info, see http://web.presby.edu/~jtbell/usenet/ ]


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

Date: 2 Mar 1997 15:27:51 GMT
From: Eryq <eryq@enteract.com>
Subject: Announce: ALPHA copy of MIME::Lite is now online
Message-Id: <5fc69n$i4g$1@nadine.teleport.com>

Because so many folks have asked for it, and waited so long, I
have put an Alpha copy of the new MIME::Lite module on-line.

If you ever wanted to be able to send email messages with attached 
GIF files, but you didn't want to have to pull over the entire 
MIME:: and Mail:: distributions, now's your chance to play around
with a single, self-contained module.  Comments are most welcome. 

ALPHA copy (with not-well-tested code) on-line at:

        http://enteract.com/~eryq/CPAN/MIME-Lite/

Docs also, at:

        http://enteract.com/~eryq/CPAN/MIME-Lite/docs/MIME/

Knock yourselves out.  Send me email if/when stuff breaks; I try
and do 24-hour turnarounds on bug reports. 
If all goes well, I'll upload it to the CPAN.
 
** Note: as the name implies, this is not a substitute for the
real MIME-generating modules (which I also maintain).  It is
a low-overhead, 90%-of-the-time-it'll-do-what-you-need solution.
Any popular stuff in MIME::Lite will go into MIME::Entity (which 
currently is too cumbersome for the tastes of some folks, but will
be getting less-so). 

-- 
  ___  _ _ _   _  ___ _   Eryq (eryq@enteract.com)
 / _ \| '_| | | |/ _ ' /  Hughes STX, NASA/Goddard Space Flight Cntr.
|  __/| | | |_| | |_| |   http://www.enteract.com/~eryq
 \___||_|  \__, |\__, |__ 
           |___/    |___/ UNIX-FM: more talk ; less yacc yacc yacc




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

Date: 2 Mar 1997 15:28:11 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: ANNOUNCE: Font::TFM, TeX::DVI, TeX::Hyphen, all 0.03
Message-Id: <5fc6ab$i5m$1@nadine.teleport.com>
Keywords: TFM TeX perl DVI Hyphen

I have uploaded to PAUSE modules Font::TFM, TeX::DVI and TeX::Hyphen.

Font::TFM reads information from TeX's TFM file and provides methods
for manipulation with this info, eg. dimensions of a character, expansion
of ligatures and kernings, width of the whole word, parameters of the
font, ...

TeX::DVI provides interface for writting DVI file from perl. It has
basic methods for elements in the .dvi file, as preamble and
postamble, begin and end of page, change font, writting out words and
spaces. It cooperates with the Font::TFM objects to get info about the
letters it the font.

TeX::Hyphen uses TeX's hyphenation patterns to hyphenate words,
returns possitions in a word where the hyphenation is allowed.

All modules are in version 0.03 and should arrive to CPAN soon. If you
find them of some use and have any comment, please send them to me.
Also, if you have suggestion about the methods and their structure,
I would like to hear them. They were created to suit my needs but may
get polished in the future development.

Honza Pazdziora (JANPAZ on CPAN).

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------




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

Date: Sun, 2 Mar 1997 12:18:11 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: class inheritance problem with autoload
Message-Id: <adelton.857305091@aisa.fi.muni.cz>

"John A. Lewis" <john.lewis@syspac.com> writes:

>  I am writing a new set of methods to extend an existing object class.
> Everything works great, except for methods which are autoloaded within
> the parent class.
> 
> Since the $AUTOLOAD variable now contains my package name instead of the
> 
> parent's package name, its AUTOLOAD routine attempts to get the methods
> from a directory with my package name, which doesn't exist.
> 
> Any suggestions on how best to deal with this?

It looks like there is a problem with the original class which doesn't
support futher extensions. You should either change the behavior of
the AUTOLOAD method in the parent class, if you are the author of it.

Or I got this idea (but gurus might say it wrong, we shall see): Make
an AUTOLOAD method in your new class, change the $AUTOLOAD variable of
the parent class in it and the call SUPER::AUTOLOAD. Here I have an
example:

$ perl
package parent;
sub AUTOLOAD {
	print "parent::auto: \$AUTOLOAD=$AUTOLOAD\n";
	}

package child;
@ISA = qw( parent );
sub AUTOLOAD {
	print "child::auto: \$AUTOLOAD=$AUTOLOAD\n";
	$parent::AUTOLOAD = "parent::krtek";
	child->SUPER::AUTOLOAD();
	}
package main;
child::jezek(1);

Output is
child::auto: $AUTOLOAD=child::jezek
parent::auto: $AUTOLOAD=parent::krtek

So the AUTOLOAD method of the parent class will think it's been called
from the parent class.

Hope this helps a little.

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: 2 Mar 1997 15:25:17 GMT
From: "Dr John A. R. Williams" <J.A.R.Williams@aston.ac.uk>
Subject: GetOpt::Regex updated to Version 0.02
Message-Id: <5fc64t$i40$1@nadine.teleport.com>

Announcing the update of Perl Module GetOpt::Regex to Version 0.02

Changes fix problem which prevented pod2man working correctly

Uploaded to ftp://franz.ww.tu-berlin.de/incoming

Getopt::Regex - handle command line options flexibly using 
                regular expressions 

This package provides a flexible yet simple method for handling
command line options. It does not stamp over the callers namespace or,
currently, inforce any particular standard for the options - the user
can do this if they want. By using anonymous closures sophisticated
option specifications can easily be constructed.

Module Entry

12) Option, Argument, Parameter and Configuration File Processing

Name           DSLI  Description                                  Info
-----------    ----  -------------------------------------------- -----
Getopt::
::Regex        Rdpr  Regular expression option handling           JARW

  JARW John A.R. Williams <J.A.R.Williams@aston.ac.uk>




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

Date: Sun, 2 Mar 1997 18:08:51 +0000
From: Geoff Wilkins <GeoffW@wordsmith.demon.co.uk>
Subject: Help!  Testing Perl CGI scripts on local Windows/DOS system
Message-Id: <vrtSQCAzIcGzEwC7@wordsmith.demon.co.uk>

I don't at present have access to web-space with permission to run CGI
scripts.

I've been trying without success to figure out a way to test Perl CGI
scripts by running them, called from <FORM action=...> tags in HTML
files, on my local Windows95/DOS system.  (I have of course got Perl
installed on the system.)

Is there a way to do this?  If so, I'd be grateful for advice, either
here or by e-mail to GeoffW@wordsmith.demon.co.uk.

(And if this is the wrong newsgroup for such a query, I'd be grateful
for redirection.)
-- 
Geoff Wilkins

34 Farnham Road, Handsworth, Birmingham B21 8EG, UK, 
                telephone: 0121-554 8264


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

Date: Sun, 02 Mar 1997 09:45:31 -0700
From: josin alvistur <josin@dimensional.com>
Subject: HOW to set up alias to perl command in unix shell ?
Message-Id: <3319AEAB.23F4@dimensional.com>

i am trying to set up an alias in tcsh to do:

alias xx perl -e 'print "VAR1 = ", `printenv VAR1`;'

(VAR1 is properly set in the environment)


the syntax above is JUST to show what the intended result is.

--i have tried several schemes to properly define the alias, and
they come back with:
% unmatched '.
% command not found ')'
etc....

i tried enclosing with " and ' and () and escaping those inside
the alias definition... nothing works.  did not find much on
the FAQ's neither.

Solutions for bash will be appreciated too. !!

thanks - josin


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

Date: 2 Mar 1997 13:54:37 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: How to spam - legitimately
Message-Id: <5fc0qt$qfl$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    sb@en.muc.de writes:
:Could we settle for "send me a piece of email" as a compromise, then?! ;-)
:Just like you say "a piece of information", for instance? :-)

Sure -- just don't ask for "a few informations", though. :-)

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    X-Windows: The Cutting Edge of Obsolescence.
	--Jamie Zawinski


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

Date: 02 Mar 1997 07:07:46 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: Michael Sadd <sadd@msc.cornell.edu>
Subject: Re: Inline subroutines?
Message-Id: <8cg1yebd59.fsf@gadget.cscaper.com>

>>>>> "Michael" == Michael Sadd <sadd@msc.cornell.edu> writes:

Michael> Michael Sadd wrote:
>> 
>> I'm not sure, but I think what Larry, Randall, et. al.

Michael> I'm also not sure why I think I am on a first name basis with
Michael> these gentlemen I've never met.  Pardon me, I should have been
Michael> more respectful.

Hey, Michael, *we* go by our first names. :-)

Or should I call you Mr. Sadd? :-)

(actually, you probably weren't talking about me... must be somebody
named Randall here too... :-)

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 548 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for detail

-- 
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@ora.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: 02 Mar 1997 07:11:39 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Interview With The Internet's Wise Guys Of Perl - Web Week
Message-Id: <8cd8tibcys.fsf@gadget.cscaper.com>

>>>>> "inforch" == inforch  <inforch@cris.com> writes:

inforch> Interview With The Internet's Wise Guys Of Perl - Web Week 
inforch> Find this article at:

inforch> NewsLinx Daily Web News (2/28/97)

inforch> http://www.newslinx.com/

I rejected this article from comp.lang.perl.announce for two reasons:

(1) the return address is BOGUS.  Why?

(2) the web address leads to a page that is hostile for non-frames browsers.
And this is a magazine that is meant for *web* readers?  Ouch!

And, I would have said both of these in private, but #1 makes it hard.
Hopefully, the poster is also reading the group.  (But if not, that'd
be complaint number 3.)

So, this smells like spam, even if it was intended to be something
good.  Ahhh, kids. :-(

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 548 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
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@ora.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: 2 Mar 1997 15:24:42 GMT
From: "Dr John A. R. Williams" <J.A.R.Williams@aston.ac.uk>
Subject: Math::Trig Release 1.02 Update
Message-Id: <5fc63q$i35$1@nadine.teleport.com>

Announcing the updated release of Perl Module Math::Trig Version 0.02

The update includes changes made by Jason Smith fixing reversal of sinh
and cosh and adding many new functions to complete the set

I have uploaded this module in file Math-Trig-0.02.tar.gz to the
CPAN archives - it will appear under my home directory.

Math::Trig -
	 Exports the missing inverse and hyperbolic Trigonemetric Functions
	 (tan sec csc cot asin acos atan asec acsc acot sinh cosh
	  tanh sech csch coth asinh acosh atanh asech acsch acoth)

Suggested Module Entry

6) Data Types and Data Type Utilities (see also Database Interfaces)

Name           DSLI  Description                                  Info
-----------    ----  -------------------------------------------- -----
Math::
::Trig         bdpf  tan sec csc cot asin acos atan asec acsc
       		     acot sinh cosh tanh sech csch coth asinh
		     acosh atanh asech acsch acothtan asin acos
		     sinh cosh tanh sech cosech     		  JARW

  JARW John A.R. Williams <J.A.R.Williams@aston.ac.uk>




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

Date: 2 Mar 1997 15:24:59 GMT
From: "Dr John A. R. Williams" <J.A.R.Williams@aston.ac.uk>
Subject: Math:VecStat 1.04
Message-Id: <5fc64b$i39$1@nadine.teleport.com>

Announcing the release of Perl Module Math::VecStat Version 0.04

This release fixes an erro which prevented pod2man working correctly
to generate the documentation.

I have uploaded this as Math-VecStat-0.03.tar.gz to the CPAN archives
It will appear under my home directory.

Math::VecStat - Some basic numeric stats on vectors

   This package procides some basic statistics on numerical
vectors. Included are max , min , maxabs, minabs, sum , average.
See the module file for further information.

Suggested Module Entry

6) Data Types and Data Type Utilities (see also Database Interfaces)

Name           DSLI  Description                                  Info
-----------    ----  -------------------------------------------- -----
Math::
::VecStat      Rdpr  Some basic numeric stats on vectors          JARW

  JARW John A.R. Williams <J.A.R.Williams@aston.ac.uk>




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

Date: Sun, 2 Mar 1997 18:45:24 GMT
From: jgd@cix.compulink.co.uk ("John Dallman")
Subject: Re: NT/95 Registry
Message-Id: <E6FIro.25t@cix.compulink.co.uk>

"David Williamson" <drwill@loginet.com> asked:

> Anyone know how to access (add/delete keys) the Win 95/NT registry from 
a
> PERL script?

Try the win32::registry module, supplied with ActiveWare Perl for Win32?

John Dallman, jgd@cix.co.uk. A micro-FAQ on things I keep getting asked: 
#!perl is at ftp://.../CPAN/ports/msdos/tips-tricks/hbp_403.zip, BigPerl 
for MS-DOS can be found in CPAN via http://www.perl.com, Perl for NT/Win 
95 can be found at http://www.activeware.com, with an excellent FAQ file 
at http://www.endcontsw.com/people/evangelo/Perl_for_Win32_FAQ.html and 
no, I don't have the slightest idea what's wrong with your CGI script.


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

Date: Sun, 2 Mar 1997 07:07:23 -0800 (PST)
From: mattw@engr.CSUFresno.EDU (Matthew John Webster)
Subject: parsing?
Message-Id: <Pine.SOL.3.94.970302070108.13143A-100000@triton>

I have a bit pattern like:
 0001111000001000

and would like to find all instances
of four '1's and one '1' separated by
four '0's on the range:
0000000000000000
1111111111111111

I can muscle out all the exceptions but
look to emulate the ideal programmer am
searching for a short cut.

The biggest headache of involves lines
like this:
1100000010000011   -and this
0111100000000001

the first one's valid, the second isn't
(because of wrap around)

suggestions?




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

Date: Sat, 01 Mar 1997 09:49:47 -0500
From: John Giraldi <jxg@redfox.mhv.net>
Subject: perl 1st edition example in perl5
Message-Id: <3318420B.6FCC93B6@redfox.mhv.net>

Hello,

The first Perl edition has a
section of Real Perl Programs.
The example I'm referring to
is known as the Receptionist
that acts in a similar nature
to "inetd". I cannot get this
to run under Perl5. It seems that
filehandles that are used in the
"socket", "bind" and "listen"
sections of the "startServer"
subroutine cannot be used
over in the "accept" section
of the "spawn" subroutine.
These filehandles are stored
in an an associative array
(ie $services{$service} = $service)
where @services is the array
of filehandles.

Has anyone tried to get this
example running on Perl5?

If so, can you help me out?

         Thanks
              John Giraldi


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

Date: 2 Mar 1997 16:04:35 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: perl 1st edition example in perl5
Message-Id: <5fc8ej$9ae@fridge-nf0.shore.net>

John Giraldi (jxg@redfox.mhv.net) wrote:

: The first Perl edition has a
: section of Real Perl Programs.
: The example I'm referring to
: is known as the Receptionist

John,

Sockets changed a bit from perl4 -> perl5 (I'd be more descript, but this
posting might become annoying long).  If you have perlipc.pod installed 
with your distribution, you should check out the sockets section, where 
a sample server and client are written.  I tried this code with the 
examples from _Learning Perl_, and a few other places, and after some 
minor revisions, things were okay.

--
Nathan V. Patwardhan
nvp@shore.net
"Hello, good citizen.  I'm Batman.
Would you like to be my assistant?
Would you like to ride with me?
Would you like to ride with Batman?"


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

Date: Sun, 02 Mar 1997 12:40:00 -0500
From: Ying Hu <Y_Hu@fccc.edu>
Subject: Perl for Win3.11
Message-Id: <3319BB70.794B@fccc.edu>

Hello,

Where is the Perl for Window3.11 ?

Thanks

Ying


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

Date: Sun, 02 Mar 1997 19:01:29 GMT
From: bikr@pipeline.com (Chris Allen)
Subject: Re: Perl for Win3.11
Message-Id: <5fcisg$d60@camel1.mindspring.com>

In article <3319BB70.794B@fccc.edu>, Ying Hu <Y_Hu@fccc.edu> wrote:
>Hello,
>
>Where is the Perl for Window3.11 ?
>
>Thanks
>
>Ying
The only one that comes close (to my knowledge) is the Perl for Win32.  I used 
it under Win95 for awhile, but it didn't install at all (luckily, it would 
still work-I don't understand either).  I believe that Perl for Win32 was 
intended for NT.  I use Perl under Linux now.

Chris


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

Date: Sun, 02 Mar 1997 15:57:12 GMT
From: dirkl@midak.com (Dirk Leas)
Subject: Re: PerlIS+Win32::ODBC - Can't call method "Sql"...
Message-Id: <3319a287.3940876@207.126.101.80>

On Sun, 02 Mar 1997 05:16:46 GMT, dirkl@midak.com (Dirk Leas) wrote:

>I have a simple script that executes fine under perl.exe, but under
>perlIS I get the error:  "Can't call method "Sql" without a package or
>object reference at c:\work\scripts\getCourseList.pl line 15.".
>
>I've checked the FAQ, but still a newbie, so be gentle ; - )
>
>Adios,
>Dirk

DOOOOOOOOOOOHHHHHHHHHH...

Here's sample source code (again, works great with perl, not with
perlis):

use Win32::ODBC;			# odbc services


$html = '';
$prereqs = '';
$outline = '';
$cid = $ENV{'QUERY_STRING'};
$template = 'course.htm';


# load standard template
open(FP, $template);
@templateStream = <FP>;
$_ = "@templateStream";
close(FP);
	
# grab course info
$data = new Win32::ODBC("midak");

# ********** Next line is 15, I cut this code  ************
$data->Sql("select * from vCourseLogo where cid=$cid");
$data->FetchRow();
undef %rows;
%rows = $data->DataHash();
$prereqs = "$rows{prereq}<br><ul>";		# save prereq/outline
descr.
$outline = "$rows{outline}<br><ul>";
s/%%courseSpec/$rows{name}/;
s/%%courseDesc/$rows{desc}/;
s/%%who/$rows{who}/;
s/%%coursePrice/\$$rows{price}/;
s/%%courseDays/$rows{days}/;
s/%%courseLocation/$rows{location}/;
s/%%logo/$rows{logo}/;
 ...

Thanks again...

Adios,
Dirk



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

Date: 2 Mar 1997 14:35:50 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: problems using bareword symbols (O_CREAT, etc) in perl 5.003_00
Message-Id: <5fc386$r14$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting denied to cited author due to bogus address]

In comp.lang.perl.misc, 
    huntd@pocc (Doug Hunt) writes:
:Hi all:  I have a biggish production perl operation which I just upgrade<SNIP>
:
:Now all symbolic flags fail to work.  So, for example, 
:
:tie (%bad, NDBM_File, "$Dplib::perlDB/badsoundings", O_RDWR, 0660);
:
:gives this error message:  O_RDWR not numeric.
:
:Is this a 'feature' of 5.003 or a bug?  This is causing me problems in much 
:existing code, but I don't want to go back to 5.002 in that several new
:modules require it.

Did you "use strict"?  Did use "use Fcntl"?  Did you use 0666 so as to
let the umask influence the mode?  I hate programs that usurp my umask.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

s = (unsigned char*)(SvPVX(sv));    /* deeper magic */
    --Larry Wall, from util.c in the v5.0 perl distribution


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

Date: Sun, 2 Mar 1997 12:34:22 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: sort by multiple keys?
Message-Id: <adelton.857306062@aisa.fi.muni.cz>
Keywords: sort multiple keys

bosborne@nature.berkeley.edu (Brian Osborne) writes:

> To the group,
> 
> Forgive the elementary nature of this question, I
> could not find answers in the FAQ or the books.
> I have strings, say, of this type :
> 
> mmm12aaa aaa2xxx aaa1yyy mmm3xxx
> 
> I can sort these to make  :
> 
> aaa2xxx aaa1yyy mmm12aaa mmm3xxx
> 
> but I cannot sort again on a second key to make :
> 
> aaa1yyy aaa2xxx mmm3xxx mmm12aaa
> 
> My second sort destroys the first sort! Any hint  would
> be appreciated.

You did not give us and example that would shold how it "destroys the
first sort". We do not even know If you have the strings in an array
or where. Anyway, this is a code that will make from your input the
desired output:

$_ = <>;             
chomp;
@a = split /\s+/;
@b = sort { ($a =~ /(\d+)/)[0] <=> ($b =~ /(\d+)/)[0] } @a;
print "@b\n";

On input

mmm12aaa aaa2xxx aaa1yyy mmm3xxx

it prints

aaa1yyy aaa2xxx mmm3xxx mmm12aaa

Is this what you were asking about?

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: Sun, 02 Mar 1997 20:47:45 +0100
From: Sebastien <sebast@hrnet.fr>
Subject: Web download script..????
Message-Id: <3319D95D.1D01@hrnet.fr>

hi!

I just want to know how to make a unix script like cgi to auto download
a given web page.

PLEASE REPLY BY E-MAIL AT sebast@hrnet.fr

Thanks in advance,
Sebastien.


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

Date: 2 Mar 1997 10:55:59 -0500
From: Roderick Schertler <roderick@argon.org>
To: tim@dierks.org (Tim Dierks)
Subject: Re: What's wrong with this Perl?
Message-Id: <pz209y8f9h.fsf@eeyore.ibcinc.com>

On Sun, 02 Mar 1997 02:54:04 -0800, tim@dierks.org (Tim Dierks) said:
> 
> $#a = 5;
> foreach $v (@a) {
>     $v = 1;
> }
> 
> Emits the error message:
> Modification of a read-only value attempted at test.pl line 3.

The only thing wrong with your code is that it exercises a bug in Perl.
This bug is fixed in the current developer sources (soon going to public
beta), so it will be fixed in 5.004.

-- 
Roderick Schertler
roderick@argon.org


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

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

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

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