[8597] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2214 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 31 06:07:50 1998

Date: Tue, 31 Mar 98 03:00:28 -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           Tue, 31 Mar 1998     Volume: 8 Number: 2214

Today's topics:
        Can't delete file using a perl script <leslielong@tinet.ie>
        filecopy on Windows <emile.schenk@siemens.at>
    Re: Getopts::Long seemingly incompatible with 'use stri <johan_vromans@nl.compuware.com>
        How to read from keyboard without enter? (Tony Christian Svderudd)
    Re: How to read from keyboard without enter? (Tony Christian Svderudd)
    Re: How to read from keyboard without enter? <mikolas@works.fi>
        How to stay in interactive mode after press Ctrl-C ? <James_Yang@via.com.tw>
    Re: How to stay in interactive mode after press Ctrl-C  <zenin@archive.rhps.org>
    Re: IMAP support? (Malcolm Beattie)
    Re: Increment [++] ne Assignment-add [+=] <rjk@coos.dartmouth.edu>
    Re: Increment [++] ne Assignment-add [+=] <lr@hpl.hp.com>
    Re: Is there a "Newsgroup" for Newbies to Perl? <dformosa@st.nepean.uws.edu.au>
    Re: Kill Signals going to forked System command not Per <andrew@erlenstar.demon.co.uk>
        Number of Perl Users/Instalitations. <quillan@doitnow.com>
        Number Sorting <judas@interprice.com>
        Odd or even function <judas@interprice.com>
    Re: OLE Automation with Excel Example Required (Jan Dubois)
    Re: OLE Automation with Perl (Jan Dubois)
    Re: Perl, Access 97, ODBC, Database help for a newbee. <NOSPAM.stephane.barizien@ocegr.fr>
    Re: Sneex having problems <sneaker@mediaone.net>
    Re: Sneex having problems <sneaker@mediaone.net>
    Re: Something to POST some data ... <mikolas@works.fi>
    Re: status of Threads in PERL? (Malcolm Beattie)
    Re: Suppressing "used only once" (Bart Lateur)
    Re: Sysadmin struggeling with PERL/Sed and etc... <roland@consol.de>
    Re: Sysadmin struggeling with PERL/Sed and etc... (Joergen W. Lang)
    Re: The "Y2k-bugs-are-not-just-a-legacy-problem" FAQ (Craig Berry)
    Re: Variable Interpolation inside regular expression <rjk@coos.dartmouth.edu>
        Web Developer needed in Surrey, UK <charles@a1assured2.demon.co.uk>
    Re: what is cgi_auto_file? <joi@io.is>
    Re: Win32::OLE and Word97 (Jan Dubois)
    Re: Win32::OLE and Word97 (Jan Dubois)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Sat, 28 Mar 1998 23:39:55 -0000
From: "Leslie Long" <leslielong@tinet.ie>
Subject: Can't delete file using a perl script
Message-Id: <6fk1io$71218@kirk.tinet.ie>

I am new to Perl and Unix, and am trying to use perl to delete a text file.

I want to run a perl script when a visitor clicks on a hyperlink on my
website.

The script runs perfectly when I Telnet into the server and run 'perl
myprog.cgi', but, when I try from a browser, the write and delete parts of
my script don't work.

I have tried to set file and directory permissions using chmod but can't
seem to get things to work.

Thanks in advance.

Leslie




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

Date: Tue, 31 Mar 1998 11:42:26 +0200
From: Emile Schenk <emile.schenk@siemens.at>
Subject: filecopy on Windows
Message-Id: <3520BA82.4F50814A@siemens.at>

Question from a newbie:

How do I copy a file in PERL (Windows)? I tried
system("copy a.a b.b")
but this doesn't work.

Thanks for any hints!

****************************************************
Emile Schenk
  Siemens AG Austria
    Tel 0043 1 1707 37521
      Email emile.schenk@siemens.at
****************************************************


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

Date: 31 Mar 1998 09:28:36 +0200
From: Johan Vromans <johan_vromans@nl.compuware.com>
Subject: Re: Getopts::Long seemingly incompatible with 'use strict'
Message-Id: <wl3yaxre2u3.fsf@plume.nl.compuware.com>

"nwi-tech" <nwi-tech@dircon.net> writes:

> use strict;
> use Getopt::Long;               # options module
> 
> my($opt_file);
> my(@optl) = ("file=s");               # options

Use:

  my (@optl) = ("file=s" => \$opt_file);

-- Johan


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

Date: 31 Mar 1998 06:01:57 GMT
From: e75727@majakka.uwasa.fi (Tony Christian Svderudd)
Subject: How to read from keyboard without enter?
Message-Id: <6fq0sl$chq$1@verkko.uwasa.fi>


-- 
3333


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

Date: 31 Mar 1998 06:12:10 GMT
From: e75727@majakka.uwasa.fi (Tony Christian Svderudd)
Subject: Re: How to read from keyboard without enter?
Message-Id: <6fq1fq$csn$1@verkko.uwasa.fi>

oops. a mistake.


So how do I read a character from keyboard without pressing the enter?
 ..
print "something (y/n)? ";
chop($valinta = <STDIN>");
 ..
I know it's not a big thing to press enter but if someone knows how to do this 
without pressing it, could you plese tell me.

tony -- e75727@uwasa.fi



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

Date: Tue, 31 Mar 1998 10:11:34 +0300
From: "Mikko Hdmdldinen" <mikolas@works.fi>
Subject: Re: How to read from keyboard without enter?
Message-Id: <6fq4tp$p7u@idefix.eunet.fi>


Tony Christian Svderudd wrote in message <6fq1fq$csn$1@verkko.uwasa.fi>...
>
>So how do I read a character from keyboard without pressing the enter?
>..
>print "something (y/n)? ";
>chop($valinta = <STDIN>");
>..
>tony -- e75727@uwasa.fi
>

Refer the FAQ.

-Mikko




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

Date: Tue, 31 Mar 1998 16:57:14 +0800
From: James Yang <James_Yang@via.com.tw>
Subject: How to stay in interactive mode after press Ctrl-C ?
Message-Id: <3520AFE9.5E290639@via.com.tw>

Hi,

    I am writing a program about verilog. I wish this program can send
my job to
a workstation with the lightest load. But if I press Ctrl-C, then the
verilog simulator
will be interrupted and abandoned. I can not stay in the interactive
mode like when
I execute verilog in C shell directly. Would you please teach me how to
avoid this
situation?

Thanks


    The followings are part of my program.

exec("verilog2.3 @ARGV");
exec("rsh $host 'cd $pwd; verilog2.3 @ARGV'");

Bauli



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

Date: 31 Mar 1998 10:23:30 GMT
From: Zenin <zenin@archive.rhps.org>
Subject: Re: How to stay in interactive mode after press Ctrl-C ?
Message-Id: <891340223.497586@thrush.omix.com>

James Yang <James_Yang@via.com.tw> wrote:
: I am writing a program about verilog.  I wish this program can send my
: job to a workstation with the lightest load.	But if I press Ctrl-C, then
: the verilog simulator will be interrupted and abandoned.

	$SIG{INT} = 'IGNORE';

-- 
-Zenin
 zenin@archive.rhps.org


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

Date: 31 Mar 1998 10:06:23 GMT
From: mbeattie@sable.ox.ac.uk (Malcolm Beattie)
Subject: Re: IMAP support?
Message-Id: <6fqf6v$6sk$1@news.ox.ac.uk>

In article <6fh69m$ak9$1@news.idiom.com>,
Andy Matinog  <nonoboy@idiom.com> wrote:
>In comp.lang.perl.modules kjj@arf.eng.mcd.mot.com wrote:
>> I'll be releasing an alpha version of Net::IMAP next week.
>
>YES! I was considering writing one myself. The only main thing keeping
>me from doing so was the RFC.

Rather than play games with raw IMAP, I've taken the lazy approach and
am writing an XSUB interface to Mark Crispin's cclient library, as
used by pine and the UW imapd. The advantage of that is that you can
just say

    use Cclient qw(set_callback);
    set_callback(login => \&get_username_and_password);
    $stream = Cclient->new("{somehost/imap}INBOX");
    ...

and the cclient library does all the fancy IMAP stuff for you
(complete with read-ahead, caching and so on). Or you can just change
the mailbox name and have the exact same API for local mailboxes in
all sorts of formats (Berkeley, mh, tenex and all the rest).

--Malcolm

-- 
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Oxford University Computing Services
"I permitted that as a demonstration of futility" --Grey Roger


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

Date: Tue, 31 Mar 1998 00:58:44 -0500
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
To: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Increment [++] ne Assignment-add [+=]
Message-Id: <3520861A.DB61A5E6@coos.dartmouth.edu>

[posted and mailed]

Larry Rosler wrote:
> 
> With the -w flag set, the ++ operation on an undefined variable is
> accepted quietly, but the += operation draws a diagnostic.

What version of perl are you using?  This was fixed in perl5.004 (or maybe
even 5.003), which will not output a warning when using += on an undefined variable.

-- 
 _ / '  _      /         - aka -             rjk@coos.dartmouth.edu
( /)//)//)(//)/(    Ronald J. Kimball           chipmunk@m-net.arbornet.org
    /                                   http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Tue, 31 Mar 1998 01:13:48 -0800
From: Larry Rosler <lr@hpl.hp.com>
To: rjk@coos.dartmouth.edu
Subject: Re: Increment [++] ne Assignment-add [+=]
Message-Id: <3520B3CC.EA7481C5@hpl.hp.com>

Ronald J Kimball wrote:
> 
> [posted and mailed]
> 
> Larry Rosler wrote:
> >
> > With the -w flag set, the ++ operation on an undefined variable is
> > accepted quietly, but the += operation draws a diagnostic.
> 
> What version of perl are you using?  This was fixed in perl5.004 (or maybe
> even 5.003), which will not output a warning when using += on an undefined variable.
> 
> --
>  _ / '  _      /         - aka -             rjk@coos.dartmouth.edu
> ( /)//)//)(//)/(    Ronald J. Kimball           chipmunk@m-net.arbornet.org
>     /                                   http://www.ziplink.net/~rjk/
>         "It's funny 'cause it's true ... and vice versa."

It was tested on 5.002.  I have just tested again on 5.004 and, as you
state, there is no diagnostic.  Unfortunately, the software executes on
several UNIX and Wintel web servers over which I have no control.  I'll
just have to live with the slower-and-uglier, probably for a long while.

(The flip answer "Upgrade your perl!" that I have seen frequently here
doesn't conform to everyone's reality.  I have been able to persuade all
the webmasters to provide Perl 5, in addition to Perl 4.036!  But going
beyond that is hard.  People who provide *services* tend to be quite
conservative about perceived risk/benefit decisions in areas such as
compilers and libraries, where many users might be affected.  So my code
reads "require 5.002;" -- sigh...)

Thanks you for identifying the problem.  I'm glad the discrepancy (bug?)
has been fixed in newer perls.

Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com


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

Date: 31 Mar 1998 08:17:26 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <891332244.965097@cabal>

In <6fkjo1$bbl$1@gaia.ns.utk.edu> "Bob Gwynne" <gwynne@utkux.utk.edu> writes:

>I thought that programmers were suppose to be logical thinkers.

Not necceryly so.  It takes a kind of irrationality to program.

--
I'm a perl programer if you need perl programing hire me. Buy easter bilbies.
Please excuse my spelling as I suffer from agraphia see the url. Support NoCeM
http://www.cit.nepean.uws.edu.au/~dformosa/Spelling.html  http://www.cm.org/ 
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: 31 Mar 1998 09:40:55 +0100
From: Andrew Gierth <andrew@erlenstar.demon.co.uk>
Subject: Re: Kill Signals going to forked System command not Perl script
Message-Id: <874t0f2qy0.fsf@erlenstar.demon.co.uk>

[several regional groups removed]

>>>>> "M" == M J T Guy <mjtg@cus.cam.ac.uk> writes:

 M> But there's no general means of knowing whether the child is
 M> (intended to be) interactive.    So UNIX arbitrarily chooses to hit
 M> the child in all cases.

In fact, this is not true.

The signal is sent to *both* processes, but inside a call to system(),
the parent process arranges to ignore SIGINT.

Therefore, one alternative solution is to do the fork/exec yourself.

-- 
Andrew.


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

Date: Mon, 30 Mar 1998 22:42:20 -0700
From: "John C. Quillan" <quillan@doitnow.com>
Subject: Number of Perl Users/Instalitations.
Message-Id: <3520823B.6C0397B9@doitnow.com>

I looked around but couldn't find any information about the estimated
number
of Perl users and instalations of Perl.

Any information based on Number of Downloads, Number of books sold,
etc.. would be
helpfull.

Does anyone know of such information on the net, or any Ideas on how it
could be derived.
I looked at what Red Hat did to estimate the number of Linux users.

Thanks,

John C. Quillan



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

Date: Tue, 31 Mar 1998 01:16:46 -0800
From: "Dan Serban" <judas@interprice.com>
Subject: Number Sorting
Message-Id: <6fqetf$bad$1@news.junction.net>

I am creating a script which needs to output a set of numbers in human
readable sortation.

eg.

32
11
992
321

computers sort it to:

321
992
 11
 32

need to be sorted as:

11
32
321
992

so my dillema is that all of these entries need to be read into an array,
then sorted whithin the array and output from lowest to highest amount,
could someone either throw me some simple pseudo code or actual perl5 code
my way?  Any help would be appreciated.

Dan Serban
judas@interprice.com
http://www.interprice.com







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

Date: Tue, 31 Mar 1998 02:11:23 -0800
From: "Dan Serban" <judas@interprice.com>
Subject: Odd or even function
Message-Id: <6fqfir$bdh$1@news.junction.net>

Is there an odd or even perl function that could be used as a boolean
operator?  ie

if odd(variable)
{
}

etc...

meaning that when the variable is operated on the if statement is only true
(executable) when the number whithin the variable at the time is odd...

same for the even part of it.

Thanks
Dan Serban
judas@interprice.com
http://www.interprice.com





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

Date: Tue, 31 Mar 1998 11:36:27 +0200
From: jan.dubois@ibm.net (Jan Dubois)
Subject: Re: OLE Automation with Excel Example Required
Message-Id: <3526b807.5458278@news2.ibm.net>

[mailed & posted]

Graeme.Hutcheon@nts.hl.siemens.de (Graeme Hutcheon) wrote:

>	Could some kind person either post or send me an example of 
>	excel ole automation to send me is the right direction as the 
>        ones that come with the kit do not seem to tell me the whole story.

Could you please elaborate which kind of functionality you are looking
for? The included samples (and documentation) cover the basic issues. If
something doesn't seem to work, then an example of what you have tried
would help!

I also want to point out that there are currently two OLE modules around:
the original OLE.pm from the ActiveState distribution and the Win32::OLE
module for standard Perl. The Win32::OLE module contains quite a lot of
improvements over OLE.pm. It also contains additional documentation.

-Jan


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

Date: Tue, 31 Mar 1998 11:36:22 +0200
From: jan.dubois@ibm.net (Jan Dubois)
Subject: Re: OLE Automation with Perl
Message-Id: <3525b6da.5157826@news2.ibm.net>

[mailed & posted]

DKMarion@sprintmail.com (Dale Marion) wrote:

>I've had some success with OLE automation and Perl, but I'm unable to 
>convert the following WORD VBA script into Perl:
>
>Documents.Open FileName:="c:\cgi-bin\source_data\er015600.doc", 
>ConfirmConversions:=False,ReadOnly:=True, AddToRecentFiles:=False, 
>PasswordDocument:="", PasswordTemplate:="", Revert:=False, 
>WritePasswordDocument:="", WritePasswordTemplate:="", 
>Format:=wdOpenFormatAuto

If you use the Win32::OLE module (as opposed to the ActiveState OLE
module), you can use named parameters:

use Win32::OLE::Const 'Microsoft Word';

$Word->Documents->Open({ 
    FileName           => 'c:\cgi-bin\source_data\er015600.doc', 
    ConfirmConversions => 0,
    ReadOnly           => 1,
    AddToRecentFiles   => 0, 
    Format             => $wdOpenFormatAuto,
});

You can omit all optional parameter, that you don't want to specify.
Please note that the way the Win32::OLE::Const module imports constants
will be changed with the next version. The scalar $wdOpenFormatAuto will
then become the sub wdOpenFormatAuto.

If you use AS Perl, then you have to list all the parameter values
(without the names) in sequence.

-Jan


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

Date: Tue, 31 Mar 1998 10:49:34 +0200
From: "Stephane Barizien" <NOSPAM.stephane.barizien@ocegr.fr>
Subject: Re: Perl, Access 97, ODBC, Database help for a newbee.
Message-Id: <6fqahu$mrt1@janus.ocegr.fr>


Ken wrote in message <6focg7$8br$1@proxye1.nycap.rr.com>...
>Is there a way to have a perl script read from a Access 97 database?
>It would be even better if there was a way it could write to it too.
>
>
>

The perl distribution in the MKS Toolkit has a 'db' command that talks to
ODBC. You can invoke it from a Perl script.

http://www.mks.com


Did you look into the CPAN list of modules
(http://www.perl.com/CPAN-local//modules/by-module/) ?

There's:

DBD::ODBC, see
http://ftp.uni-mannheim.de/ftp/languages/perl/CPAN/modules/by-module/Oraperl
/TIMB/DBD/ODBC/DBD-ODBC-0.16.readme

Dave Roth has written an ODBC extension to Perl for Win32, see:
http://www.roth.net/odbc/odbc.html

hth;





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

Date: Tue, 31 Mar 1998 06:15:10 GMT
From: Sneaker's Nest <sneaker@mediaone.net>
Subject: Re: Sneex having problems
Message-Id: <35208882.6886@mediaone.net>

Bob Gwynne wrote:
> 
> I received the following from Sneex:
> 
> Please do me a big favor - my home system died Saturday night (was
> playing with the new Intel R3 version of the BeOS) and I have been
> unable to respond to people.  Please post a note to c.l.p.m. stating
> such for me (I don't have very good access from work.)
> 
> Please tell them I should be back online tomorrow and that I have
> only received three responses and that management here does not
> appear too supportive.  but where there is a will there will be
> a way...
> 
> Thx,
> Sneex :-)

Thank you Bob :-)


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

Date: Tue, 31 Mar 1998 06:17:13 GMT
From: Sneaker's Nest <sneaker@mediaone.net>
To: jdporter@min.net
Subject: Re: Sneex having problems
Message-Id: <352088FD.73C@mediaone.net>

John Porter wrote:
> Fuck.  Guess everyone better just chill out until Sneex returns.
> 
> John Porter


WHAT A FUCKING DICK HEAD :-(

PS - This was posted to fifty thousand news servers :-)

PPS - I'm back.

PPPS - Bite Me!


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

Date: Tue, 31 Mar 1998 10:17:13 +0300
From: "Mikko Hdmdldinen" <mikolas@works.fi>
Subject: Re: Something to POST some data ...
Message-Id: <6fq58c$pe9@idefix.eunet.fi>


Amit Chakradeo wrote in message <3520360E.28EFEBFD@nospam.qualcomm.com>...
>Hi,
>
>    Has anyone written a  perl module, which will help me POST some data
>to a form and get back results ?
>


Try LWP, http://www.linpro.no/lwp/ .

-Mikko




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

Date: 31 Mar 1998 10:16:56 GMT
From: mbeattie@sable.ox.ac.uk (Malcolm Beattie)
Subject: Re: status of Threads in PERL?
Message-Id: <6fqfqo$7bj$1@news.ox.ac.uk>

In article <6fp9fo$a7s$1@nnrp1.dejanews.com>,  <otis@POPULUS.net> wrote:
>Hello,
>
>I am just wondering what is the status of Threads in PERL?
>current public version of PERL does not support threads yet, but are there any
>estimates on when it will support threads?
>
>I saw in one of the perl porters group that there is some support for threads
>already, but I assume that's for developers only.

You'll be able to configure 5.005 at build time to have multithread
support. Development snapshots are available from my area of CPAN
(current one is 5.004_63).

--Malcolm

-- 
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Oxford University Computing Services
"I permitted that as a demonstration of futility" --Grey Roger


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

Date: Tue, 31 Mar 1998 08:19:48 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: Suppressing "used only once"
Message-Id: <3525a3f8.5839021@news.tornado.be>

Craig Berry wrote:

>Well, if you know all the useless variable names in oldstuff.pl (as seems 
>to be the case, given your list workaround above), why not just delete 
>them from oldstuff.pl?

Just a guess: because oldstuff.pl is used by several scripts, and some
of them DO use these "unused" variables?

	Bart.


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

Date: 31 Mar 1998 08:34:36 +0000
From: Roland Huss <roland@consol.de>
Subject: Re: Sysadmin struggeling with PERL/Sed and etc...
Message-Id: <m3u38fdzs3.fsf@pirx.roland.consol.de>


Ronald J Kimball <rjk@coos.dartmouth.edu> writes:

> ~> cat merge2
> #!/usr/local/bin/perl
> open(IN1, $in1 = shift) || die "Unable to open $in1: $!\n";
> open(IN2, $in2 = shift) || die "Unable to open $in2: $!\n";
> 
> while (defined($line1 = <IN1>) and defined($line2 = <IN2>)) {
>   $line1 =~ tr/\n//d;    # ** remove newline from $line1 **
>   print "$line1$line2";
> }
> ~> merge2 foo bar > baz

While this works fine if both files have the same number of lines (and
this  was the  case in the  original posting),  I  suggest  to add the
following to handle files with different number of lines, too:

while (defined(<IN1>) or defined(<IN2>)) {
   print $_;
}

-- 
 ...roland


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

Date: Tue, 31 Mar 1998 12:40:30 +0200
From: joergen.lang@schwaben.de (Joergen W. Lang)
Subject: Re: Sysadmin struggeling with PERL/Sed and etc...
Message-Id: <1d6r7g2.pvu79010badvgN@host018-206.seicom.net>

Ronald J Kimball <rjk@coos.dartmouth.edu> wrote:

> Joergen W. Lang wrote:
> > 
> > [Rewritten marge.pl, with efficiency in mind]
> > [...]
> > OUTER: while (<FILE_1>) {
> >    chomp;
> >    print NEWFILE;
> >    while (<FILE_2>) {
> >       print NEWFILE;
> >       next OUTER;
> >    }   
> > }
> > [...]
> > 
> > Better ?
> 
> Much better!  Somehow, I'd forgotten about chomp in my solution; I foolishly
> used tr/// instead.

<g>

> I must say the inner while loop, with the automatic next of the outer loop,
> seems a little weird.  I guess you just wanted to avoid explicitly naming any
> variables in that section.  :-)

I was just afraid of the flames for "unnecessarily storing the contents
of both original *lines* in memory" as I got flamed for doing similar
things with files in the near past ;-)
Errrr, not really. Labeled Blocks were just the first thing that came to
my mind as I figure out exactly how to handle the FILE_1 <-> FILE_2
switching. But I suppose I'll use "and" a lot more in the future even if
it's just to cool my weird mind... ;-))

Ain't Tim Toady a great guy ?

Joergen
-- 
-------------------------------------------------------------------
   "Everything is possible - even sometimes the impossible"
             HOELDERLIN EXPRESS - "Touch the void"
-------------------------------------------------------------------


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

Date: 31 Mar 1998 06:37:32 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: The "Y2k-bugs-are-not-just-a-legacy-problem" FAQ
Message-Id: <6fq2vc$a6d$1@marina.cinenet.net>

Keith G. Murphy (keithmur@mindspring.com) wrote:
: > : Didn't account for leap years, leap seconds, or
: > : relativistic distortion
: > 
: > For shame!  Some of us out here are running webservers travelling at high
: > fractions of c!
:
: Well, yes, but *relative to what*?  :-)

Relative to the unerring, central reference point of all reality, Larry
Wall, of course.  That's why so many programmers have come to refer to the
real-world time standard by which programs are synchronized and measured
as "Wall Clock Time." 

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Tue, 31 Mar 1998 01:08:06 -0500
From: Ronald J Kimball <rjk@coos.dartmouth.edu>
To: ascendr <ascendr@intergate.com>
Subject: Re: Variable Interpolation inside regular expression
Message-Id: <3520884C.4201E996@coos.dartmouth.edu>

[posted and mailed]

ascendr wrote:
> 
> Why will both of the scripts below work on Win32 but only the list one works
> in UNIX, AIX specifically?

I'll bet that file you're reading the regexes from has Windows-style line
endings ("\r\n"), even on your Unix system.  This means that when you run the
script in Unix, your regexes will look like /ED\r/ instead of /ED/.  Assuming
that the file you're filtering has Unix line endings, all the regex matches
will fail.

Try ftping the file from Windows to Unix in ASCII mode.  Alternatively, run
this command on the file on Unix:

perl -pi -e 'tr/\r\n/\n/'

-- 
 _ / '  _      /         - aka -             rjk@coos.dartmouth.edu
( /)//)//)(//)/(    Ronald J. Kimball           chipmunk@m-net.arbornet.org
    /                                   http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Tue, 31 Mar 1998 11:28:23 +0100
From: "Charles Goodall" <charles@a1assured2.demon.co.uk>
Subject: Web Developer needed in Surrey, UK
Message-Id: <891339995.13078.0.nnrp-01.c2ded930@news.demon.co.uk>

If you have HTML skills and would like to work in Surrey, England, then you
could be the person I am looking for.
My name is Charles Goodall and I am the Business Manager for A1 Assured
Recruitment Ltd, a specialist IT recruitment agency in London.
One of our clients is in urgent need of a Junior Web Developer to work with
them on secure electronic commerce projects.
They would ideally like a college or university leaver with good knowledge
of HTML.
Any knowledge of Javascript, Java, CGI scripting, Perl, C, C++, Unix, NT &
Win 95 will be considered an advantage, although not essential.
They are offering a competitive salary and a pleasant working environment.
If you are interested in this position, please contact Charles Goodall at
charles@a1assured2.demon.co.uk




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

Date: Tue, 31 Mar 1998 08:29:35 +0000
From: "Jshann ^srir Jshannsson" <joi@io.is>
Subject: Re: what is cgi_auto_file?
Message-Id: <3520A96F.C12C0D56@io.is>

Andrew M. Langmead wrote:
> 
> Norman Katz <nkatz@cts.com> writes:
> 
> >I have perl5.003 installed on NT4 and I'm using IIS3.
> >My Script Map in the registry does not have an entry
> >for .cgi.  However, my .cgi scripts execute fine.
> >When I check file associations, cgi is associated with
> >"cgi_auto_file."  But, I can't find any references to this.
> >Any clues what this means and how my .cgi scripts are
> >actually executing?
> 
> Perl has no feature called a "cgi_auto_file" (I just searched through
> the documentation to make sure.)

If you double-click on a file of an unregistered file type in windows
(95/NT), you'll get a dialog asking you to specify what program to use
when opening the file. If you check "Always use this program...",
Windows Explorer will register the file type as "cgi_auto_file" with an
Open action of the program you specified, so that each time you
double-click on a file of this type, it will be opened with the proper
program.

Hope this helped...

Johann Th. Johannsson
IO Inter Organ
www.io.is


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

Date: Tue, 31 Mar 1998 11:36:21 +0200
From: jan.dubois@ibm.net (Jan Dubois)
Subject: Re: Win32::OLE and Word97
Message-Id: <3524b585.4816926@news2.ibm.net>

[mailed & posted]

casteels@uia.ua.ac.be (Paul.Casteels) wrote:

>I am trying to create a Word document from a Perl script.
>This is part of my first attempt:
>
>$Word = Word->new('Word.Application', \&Quit);
>$FileN = $Word->Documents->Add($CDTemplate);
>$FileN->SaveAs('dada.doc');
>
>The last statement fails with
>
>OLE error 0x80020005: "Type does not match"
>  in methodcall/getproperty "SaveAs" argument -4677756 at word.pl line 62
>
>What am I doing wrong ?

I have no idea! Your not giving a complete runable example. The following
code works:

use strict;
use Win32::OLE;

my $Word = Win32::OLE->new('Word.Application', 'Quit');
my $Doc = $Word->Documents->Add('NORMAL.DOT');
$Doc->SaveAs('dada.doc');

I've just tested it with Perl 5.004_04, and Word 8.0 (from Office 97). It
looks like you are subclassing the Win32::OLE package. Maybe something
goes wrong there.

-Jan


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

Date: Tue, 31 Mar 1998 12:02:50 +0200
From: jan.dubois@ibm.net (Jan Dubois)
Subject: Re: Win32::OLE and Word97
Message-Id: <3527be8d.7128760@news2.ibm.net>

[mailed & posted]

casteels@uia.ua.ac.be (Paul.Casteels) wrote:

>I am trying to create a Word document from a Perl script.
>This is part of my first attempt:
>
>$Word = Word->new('Word.Application', \&Quit);
>$FileN = $Word->Documents->Add($CDTemplate);
>$FileN->SaveAs('dada.doc');
>
>The last statement fails with
>
>OLE error 0x80020005: "Type does not match"
>  in methodcall/getproperty "SaveAs" argument -4677756 at word.pl line 62
>
>What am I doing wrong ?

I think I just understood your problem: You use Office 97 but don't have
the Service Release 1 installed? There are serious bugs in the Word.8 type
library, that are fixed in the SR1. For SaveAs you can use the WordBasic
compatibility object as a workaround:

$Word->WordBasic->FileSaveAs('dada.doc');

But I seriously recommend to download and install SR1.

-Jan


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

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

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