[10378] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3971 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Oct 14 10:07:14 1998

Date: Wed, 14 Oct 98 07:00:23 -0700
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, 14 Oct 1998     Volume: 8 Number: 3971

Today's topics:
    Re: anyone got a rtf->html converter in perl? <cmcurtin@interhack.net>
    Re: Are there any "perl.newbie" group or forum? <cmcurtin@interhack.net>
    Re: Are there any "perl.newbie" group or forum? droby@copyright.com
    Re: Are there any "perl.newbie" group or forum? (Joergen W. Lang)
        building perl extension with char** as parameter (Edwin Litterst)
    Re: comp.lang.perl.win32?? (Paul Murray)
    Re: Continuing s/// from the last position. <rick.delaney@shaw.wave.ca>
    Re: Continuing s/// from the last position. <antti.boman***NOSP@M***helsinki.fi>
    Re: CreateObject doesn't work via my browser <msergeant@ndirect.co.uk_NOSPAM>
    Re: email with windows 98 perl script? (Hawkwynd)
    Re: email with windows 98 perl script? (Marc Haber)
    Re: encryption (Joergen W. Lang)
        Equivalent of "unload" after "require"? wyndo@cxo.com
    Re: exit code... pramod_s@hotmail.com
        File Date/Time Stamp (r j huntington)
    Re: File Date/Time Stamp (Mike Stok)
    Re: File Date/Time Stamp (r j huntington)
    Re: NET::FTP problem (Dermot McKay)
        Perl and C++ NetUserGetInfo API <rolf.rettinger@desy.de>
    Re: Perlscript + IIS + DBI + ODBC + SqlServer <msergeant@ndirect.co.uk_NOSPAM>
    Re: prograMing: CompleteIndexSet <xah@best.com>
    Re: web_store.cgi (Joergen W. Lang)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 14 Oct 1998 08:33:11 -0400
From: Matt Curtin <cmcurtin@interhack.net>
Subject: Re: anyone got a rtf->html converter in perl?
Message-Id: <xlxpvbvfhmg.fsf@gold.cis.ohio-state.edu>

John Porter <jdporter@min.net> writes:

> But hey, if you're gonna use a stupid format like rtf, you may as
> well use the crapware that works best with it.

RTF isn't a bad idea.  There is a general need for a markup format
that can be written from standard "userland" applications on peecees
that will allow us to get the data in other formats, without
completely losing all formatting and whatnot.

RTF has problems.  I suspect that these are things like Microsoft
playing with the format so there is a slightly newer version of RTF
for each release of their software.

Blaming the implementation doesn't seem to make a lot of sense.  Sure
there are some gross things in there, but it could be much, much
worse.  Blaming the people who use the evil applications doesn't make
much sense, either.  Many of them have edicts handed down from On High
regarding what they'll use, and generally just have to deal with it.
I get data from people on Pee Cees from time to time, and ask them to
send me RTF if they must send me something that they expect me to edit
and return.

While I cannot deal with terribly complex RTF documents, I've found
that some basic regexp searching and replacing is enough to do most of 
the work.  I have an elisp function to read RTF and generate LaTeX.  I 
need to do some work with it afterward, but not too terribly much in
the general case.

-- 
Matt Curtin cmcurtin@interhack.net http://www.interhack.net/people/cmcurtin/


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

Date: 14 Oct 1998 08:16:08 -0400
From: Matt Curtin <cmcurtin@interhack.net>
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <xlxr9wbfiev.fsf@gold.cis.ohio-state.edu>

abigail@fnx.com (Abigail) writes:

> I'd prefer using Java over C, but neither would be my choice. I would
> go for either something from the school of Wirth (Pascal, Modula), LPC
> or maybe even some pseudo code.

Interesting.

LPC, as in the language of LPmud?

(I'm not arguing against this, but I want to be sure that we're
talking about the same LPC.  I was part of a project whose goal was to 
teach people how to program a number of years back, and we built a
basic MUD, took out some of the macros that completely hide the
programming, so it would force the students to actually write code.
It was pretty successful, but for other reasons the project died
before we could get far enough along to have a paper to present, which 
is what I wanted.)

ObPerl: I do not think Perl is a good first programming language.
Giving a new person who wants to "write programs" (or be a CS major)
something with the power and flexibility of Perl before they
understand what their choices entail is likely to produce the
*opposite* result that an experienced programmer will see.  The very
things about Perl that make it so liberating for the experienced
programmer are what make it so encumbering for a non-programmer trying 
to understand how to program.

Consider "our motto": "There's more than one way to do it."  Someone
who doesn't know *any* ways to do it is likely to be overwhelmed by
the number of choices for doing some of the most basic tasks.
-- 
Matt Curtin cmcurtin@interhack.net http://www.interhack.net/people/cmcurtin/


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

Date: Wed, 14 Oct 1998 12:58:49 GMT
From: droby@copyright.com
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <702768$ubf$1@nnrp1.dejanews.com>

In article <3622855f.92416462@news.demon.co.uk>,
  paul@hansenhanley.demon.co.uk wrote:
> On Tue, 06 Oct 1998 12:19:14 +0200, Hauk Langlo <hauk@forumnett.no>
> wrote:
>
> >I'm sure there are a lot of people reluctant to post questions here
> >afraid of having "RTFM" yelled in their face each time. I'm not an
> >expert myselfe and I would really like to know if there are any
> >discussion forums etc where it is actually legal to ask questions that
> >might be of a basic nature to some. If you know about something like
> >that, please let me know and me and probably a lot of other will go away
> >and leave you guys alone.
> >
> >Hauk Langlo
>
> Hauk, let me put you right
>
> Firstly, you are at an immediate disadvantage being from Norway -
> everyone will automatically assume you are a troll
>

I'm not sure about Hauk yet.  You most certainly are though.  Must have come
to the UK in one of those Viking invasions.

> B. you are posting to comp.lang.perl.cosy.clique, where the habit is
> not to answer a question, but to explain why the question shouldn't
> have been asked in the first place, preferably by complaining at great
> length about waste of bandwidth, avoiding direct mention of Perl in
> preference to superannuated American film directors of whom you may
> not have heard, telling you what a great favour they are doing you by
> discouraging you, while at the same time trying to develop a
> personality.
>

Really?  American film directors?  Not that I've heard.  Usually the answer is
shorter than the question.

And usually there IS an answer!  Most questions that are asked here are
answered.  There are unfortunate exceptions, but the FAQs are not among them.
With FAQs we prefer to pass the answers by reference rather than by value.

> iii. when someone responds "just my 2 cents worth", it is best to
> regard this as an overvaluation.
>

That value varies widely.  Is this your 2 cents worth?

> Fourthly, you need to keep a keen eye open for the logical
> inconsistency. Now I'm not a professor of logic (well I am actually),
> but when someone says "I'm sorry, but people who ask FAQs are either
> stupid or rude" you have to ask yourself whether they've considered
> that Qs are only FAQs because someone has been stupid or rude enough
> to A them F. In fact you might consider that since the F element is
> relative, it is your duty to keep asking FAQs on an F basis, in order
> to keep them in the canon. An alternative strategy would be to ask
> lots of non-FA Qs, so that the current FAQs become relatively less F,
> drop out of the FAQ document through lack of use, and you can then hit
> the group with your ex-FA Q.
>

You are, really?

People who ask Qs that aren't FAQs yet by virtue of not having been A'd F
enough are certainly not exhibiting rudeness or stupidity by asking the Q. 
Especially if they've checked the FAQ and seen that the Q isn't in it.	Can
you see where that breaks your logic, Professor?

Please take your trolling to sci.logic, where they don't have a FAQ, and
spend lots of time throwing bad logic at each other (they're probably ALL
trolls). I'm sure you'll be have lots of fun discussing Russell's Paradox and
where Godel went wrong.

> To sum up, er... learn Java.
>

Do they have a FAQ?  I would bet if the level of repeated FAQs on
comp.lang.java.* reached what it is here, they'd start getting annoyed there
too.

> (anyone any thoughts on which is better, Perl or Java?)
>

Yes.  Lots of people have thoughts on this question.

--
Don Roby

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


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

Date: Wed, 14 Oct 1998 15:47:19 +0100
From: jwl@_munged_worldmusic.de (Joergen W. Lang)
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <1dgw8y7.1d75x59qmely3N@host020-210.seicom.net>

David Adler <dha@panix.com> wrote:

> On Tue, 13 Oct 1998 13:06:58 +0100, Joergen W. Lang
> <jwl@_munged_worldmusic.de> wrote:
> 
> >David Adler <dha@panix.com> wrote:
> >
> >> On Sun, 11 Oct 1998 11:31:26 -0500, I R A Aggie
> >> <fl_aggie@thepentagon.com> wrote:
> >> 
> >> >the Camel (Programming Perl), the Ram (Perl Cookbook) and the Owl
> >> >(Mastering Regular Expressions) books on my computer desk. Oh, and
> >> >the Rommel Papers, for a little light reading. I guess you could call
> >> >that the Tank Book... :)
> >> 
> >> For heaven's sake, don't give O'Reilly any ideas!  :-)
> >> 
> >> Dave, waiting for the Brannock Device book...
> >
> >mind you ! there's _germans_ reading this thread ;-))
> 
> Oh, my!  Why didn't you say something earlier???  ;)

I am presently not at liberty to divulge that information as it might
compromise our agents in the field. ;-)

Joergen
-- 
  To reply by email please remove _munged_ from address Thanks !
-------------------------------------------------------------------
   "Everything is possible - even sometimes the impossible"
             HOELDERLIN EXPRESS - "Touch the void"


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

Date: Wed, 14 Oct 1998 12:18:47 GMT
From: el@fiz-karlsruhe.de (Edwin Litterst)
Subject: building perl extension with char** as parameter
Message-Id: <36248d46.14190022@news>

Hi,

currently I am trying to write a perl interface for a shared object
(solaris, I can't modify this shared object). I set up a .xs file and
most of the thinds work.
The only problem I currently see is a function which expects
a char** as parameter:

int
init (argc, argv)  /* Passing arguments C style */
        int     argc
        char**  argv
        OUTPUT:
        RETVAL

The generated C code looks like this:

XS(XS_Bass_init)
{
    dXSARGS;
    if (items != 2)
        croak("Usage: Bass::init(argc, argv)");
    {
        int     argc = (int)SvIV(ST(0));
        char**  argv = XS_unpack_charPtrPtr(ST(1));
        int     RETVAL;
 
        RETVAL = init(argc, argv);
        ST(0) = sv_newmortal();
        sv_setiv(ST(0), (IV)RETVAL);
    }
    XSRETURN(1);
}

When calling this perl extension the function init ends with the
following error message:
ld.so.1: /opt/gnu/bin/perl: fatal: relocation error: symbol not found:
XS_unpack_charPtrPtr: referenced in {path omitted}/Bass.so

char ** is defined in the ExtUtils/typemap file - so I don't
understand what's the problem here.

The next question, how do I build a char ** within perl that has to be
passed to this function? I already looked into perlxs, perlxstut.

Thanks in advance,
Eddie



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

Date: 14 Oct 1998 13:17:39 GMT
From: murray-paul@usa.net (Paul Murray)
Subject: Re: comp.lang.perl.win32??
Message-Id: <slrn72993i.lbu.murray-paul@unix3.netaxs.com>

On Tue, 13 Oct 1998 Daniel Grisinger <dgris@perrin.dimensional.com> wrote:
>John Porter <jdporter@min.net> writes:
>> The range of perl-related questions which are NOT platform-
>> independent, and in fact are Win32-dependent, is large.
>> I would be very happy for the people who ask and answer them
>> to do so somewhere other than clpm.
>This sounds like a reasonable idea, but I wonder if clpw32
>would actually generate much traffic?  Does anybody have any
>data on the actual number of win32 related posts to clp(misc|modules|tk)?
 
I don't know how accurate the numbers will be, but a DN search on clp.*
from Oct 1st gives about 59000 articles, 2400 matching subjects of
'win32 win95 NT microsoft'. So that's 4%, less than I thought. Body
searching on 'win32 win95 NT' gives 7500 or 12.5%, and body searching
on 'win32 win95 NT microsoft' gives 12000 or 20%, which sounds to high.

-Paul Murray
PS: (One post actually managed to get all of win32, win95, NT and
microsoft in, as I found while working out how to search on any keyword)


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

Date: Wed, 14 Oct 1998 12:38:23 GMT
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Re: Continuing s/// from the last position.
Message-Id: <36249CD8.1C504F34@shaw.wave.ca>

Michal Rutka wrote:
> 
> Uri Guttman <uri@camel.fastserv.com> writes:
> > well, you are right that /g and \G only work with m// and you want 
> > to use s///.
> 
> Where do you found that /g works only with m//??? You can look on the 
> p.72 of the Camel book you see that s/// can use /g if you want. Even 
> there is an example on the next page with s///g. Please check your 
> sources.

Perhaps order of operations would help you.

    well, you are right that (/g and \G) only work with m// and you want
    to use s///.

\G is meaningful only with /g and then only with m//.

/g behaves somewhat differently with m// and s///.

Please check your sources.

perldoc perlop
perldoc perlre

-- 
Rick Delaney
rick.delaney@shaw.wave.ca


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

Date: Wed, 14 Oct 1998 16:21:24 +0200
From: "Antti Boman" <antti.boman***NOSP@M***helsinki.fi>
Subject: Re: Continuing s/// from the last position.
Message-Id: <7028e9$quo$1@hiisi.inet.fi>

Michal Rutka wrote in message ...
>Uri Guttman <uri@camel.fastserv.com> writes:
>> how about using substr on the string. use pos, $& and m//g to locate the
>> matches, assign the new text into the spot with substr, and continue on
>> after setting the new pos. in effect this is all s/// does (but more
>> efficiently). use \G to anchor the search to the position of tha last
match.
>
>It wont be perl anymore... It will be some C style.


And that was a point I wanted to get out. I know the hard way :)

>Please consider this code:


[snip]

No I won't, it wasn't the answer :) Let me rephrase:

$str="This is the thing I want to change";
$str=~s/the/a/;
$str=~s/want/need/;

This works. Ok, but for efficiency, if the string was huge, how can I
continue the second search-replace from the point where the first one
left??? I don't want to run thru all n gigabytes of the start of the data to
find the thing from the end, if I know it's in the end.

Obviously the only way to do it is that C kind of solution, which works,
even if it's not the easiest way there could be.

I'll put this on the perl wish list. To get  \G to s///. That would solve
it.

Thanks to everyone.

-a




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

Date: Wed, 14 Oct 1998 13:10:06 +0100
From: Matt Sergeant <msergeant@ndirect.co.uk_NOSPAM>
Subject: Re: CreateObject doesn't work via my browser
Message-Id: <3624949E.67F036AC@ndirect.co.uk_NOSPAM>

nicolaslecart@my-dejanews.com wrote:
> 
> Hello,
> 
> i wrote a simple cgi script which just read the properties
> of an Excel document.
> 
> When i run it under a dos window ("perl scipt.pl") it works very well;
> But when i excute it via my browser, the function
> CreateObject can't create an Excel object instance, and i don't know why :-(((

[snip]

> What the cause of this trouble ?? are my browser or my web server
> misconfigured?

No. A web server can't run a GUI application - who would use the GUI?

Create a CSV file instead using one of the many modules to do that from
the CPAN.

-- 
<Matt/>

| Fastnet Software Ltd              |   Perl in Active Server Pages   |
| Perl Consultancy, Web Development |   Database Design   |    XML    |
| http://come.to/fastnet            |    Information Consolidation    |


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

Date: Wed, 14 Oct 1998 12:49:18 GMT
From: hawkwynd@adelphia.net (Hawkwynd)
Subject: Re: email with windows 98 perl script?
Message-Id: <36249d4e.1902016@nntp.adelphia.net>

On Tue, 13 Oct 1998 23:23:27 GMT, Rick Delaney
<rick.delaney@shaw.wave.ca> wrote:

>#!/usr/local/bin/perl 
>$| = 1;
>LOOP: {
>    print "Perl is not CGI!\n";
>    print "CGI is not Perl!\n";
>    $you_say = <STDIN>;
>    redo LOOP unless $you_say =~ /Yes, I get it now\./;
>}
>

Ok, I'll REPHRASE my question, for the literal folks out there...

Is there a *PERL* script for mail, for Windows95/98 that will work
with my web server? I'm sorry about the previous post, I meant PERL,
not the other 3-letter scripting language...


Visit Hawkwynd's Personal Web Server - Windows 98
http://hawkwynd.tzo.com


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

Date: Wed, 14 Oct 1998 13:15:44 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: email with windows 98 perl script?
Message-Id: <70288s$oa7$6@test-news.rz.uni-karlsruhe.de>

remove_me.hawkwynd@adelphia.net.remove_me! (Hawkwynd (Scott Fleming))
wrote:
>What I guess I should have posted, is - are there any *cgi scripts*
>specifically written for Windows95/98 web servers for mail handling. I
>am looking to provide a small mail service for a group of endusers.

Well, because this is not a perl question, you might want to go ahead
and ask this question again in a CGI group.

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29


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

Date: Wed, 14 Oct 1998 15:46:52 +0100
From: jwl@_munged_worldmusic.de (Joergen W. Lang)
Subject: Re: encryption
Message-Id: <1dgw75n.73ouoi1wlo41sN@host020-210.seicom.net>

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

> Joergen W. Lang <jwl@_munged_worldmusic.de> wrote:

> > for ($i = 0; $i < $length; &check)

<snip>

> > sub check
> > {
> >     if ($i < $length) { $i += 8; }
> >     else { $i += $length % 8; }
> > }
> 
> The check subroutine is unnecessary.  If $i isn't less than $length, the
> for loop is going to terminate anyway.
> 
> This gives the same result:
> 
> for ($i = 0; $i < $length; $i += 8)
>
<code without check sub snipped>

Hmm, that's weird. I threw that in because if (( $length % 8 ) != 0 )
and $i > $length I got a "substr outside of string" - error. Don't know
where that went. 
Maybe that's a hidden feature of perl. Hack it in - post it - and the
next morning the code optimized itself ?
But then... that's exactly the behaviour that some people would
expect....duh.

Joergen
-- 
  To reply by email please remove _munged_ from address Thanks !
-------------------------------------------------------------------
   "Everything is possible - even sometimes the impossible"
             HOELDERLIN EXPRESS - "Touch the void"


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

Date: Wed, 14 Oct 1998 13:41:27 GMT
From: wyndo@cxo.com
Subject: Equivalent of "unload" after "require"?
Message-Id: <7029m7$18h$1@nnrp1.dejanews.com>

I'm knee-deep in a web-based RPG (info at http://www.cxo.com/~lunatix/logic)
and I've hit a small snag. I implemented player save files by writing the
variables out as a Perl script (playername_save.cgi) which is constructed
like the following:

sub init_playername {
    \$Money = $Money;
    \$Stash = $Stash;
    \$Exper = $Exper;
    \$Guard = \"$Guard\";
}

This works fine and it lets me load a player by simply REQUIRE-ing that save
file. It's worked really great up until now.

The problem I'm having is that you can only require the file one time. I have
a function that "requires" it then calls the init_playername function. This
way, if it has already been loaded, the require is ignored but the
init_playername runs so all is well. I only need to require the file once
during normal play anyway, so if I change different values and re-save the
file, I'm not re-running the old init_playername and there are no problems.

However, when interacting with other players, I also need to load the save
file for the other player, meaning I end up bouncing back & forth between the
two. Now, there is a problem. When I change values and re-save the player
file, those values aren't kept because I have to load the other player then
re-load the current player.

I've thought of one solution that I don't like -- in my WritePlayerSave
function, create a SECOND twin save file for every player and name all the
variables $other_xxxx $other_yyyy. They should always match identically
because I use a single sub to save the file, which could be modified to save
both. Then, when interacting with another player, I wouldn't be re-using my
same globals.

I'd like to be able to "unload" a required file instead, though, but I
haven't seen any mention of how to go about doing this. This way I could
unload it, then re-require it to get the new values.

Any ideas?

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


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

Date: Wed, 14 Oct 1998 11:46:52 GMT
From: pramod_s@hotmail.com
Subject: Re: exit code...
Message-Id: <7022vb$pai$1@nnrp1.dejanews.com>

In article <700si4$nv7$1@agate.berkeley.edu>,
  alsu@soda.CSUA.Berkeley.EDU (Alan Su) wrote:
>
> i'm confused about the argument to exit.  here's my little test script:
>
> #! /usr/local/perl/bin/perl
> for ($i = 0 ; $i < 10 ; $i++) {
>   if ($pid = fork) {
>     wait;
>     print "exit code is $?\n";
>   }
>   else {
>     exit $i;
>   }
> }
>

The exit status is in the higher byte value, the lower byte contains 0.
That is why you get 0*256,1*256,2*256 etc
> i expect the output of this to be:
> exit code is 0
> exit code is 1
> exit code is 2
> exit code is 3
> exit code is 4
> exit code is 5
> exit code is 6
> exit code is 7
> exit code is 8
> exit code is 9
>
> instead, i get:
> exit code is 0
> exit code is 256
> exit code is 512
> exit code is 768
> exit code is 1024
> exit code is 1280
> exit code is 1536
> exit code is 1792
> exit code is 2048
> exit code is 2304
>
> basically, the exit codes are being scaled by a factor of 256.  now i
> know i'm doing something stupid, but what is it?  thanks!
>

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


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

Date: 14 Oct 1998 12:51:03 GMT
From: wolph@merlin.albany.net (r j huntington)
Subject: File Date/Time Stamp
Message-Id: <7026nn$8dl$1@news.monmouth.com>

How can I get a file's timestamp in perl? I need to know when
a file was created and compare it to time() minus some number
of seconds. Thanks from a perl newbie.	-rh-


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

Date: 14 Oct 1998 13:31:11 GMT
From: mike@mike.stok.co.uk (Mike Stok)
Subject: Re: File Date/Time Stamp
Message-Id: <70292v$aib@news-central.tiac.net>

In article <7026nn$8dl$1@news.monmouth.com>,
r j huntington <wolph@merlin.albany.net> wrote:
>How can I get a file's timestamp in perl? I need to know when
>a file was created and compare it to time() minus some number
>of seconds. Thanks from a perl newbie.	-rh-

You can use stat to get various bits of information about a file, but the
file's creation time isn't one of them - perldoc -f stat should get stat's
documentation for you, and this includes:

    ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
       $atime,$mtime,$ctime,$blksize,$blocks)
           = stat($filename);

Not all fields are supported on all filesystem types.  Here are the
meaning of the fields:

[...]

  8 atime    last access time since the epoch
  9 mtime    last modify time since the epoch
 10 ctime    inode change time (NOT creation time!) since the epoch

[...]

all of the *time values can easily be compared against time.

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


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

Date: 14 Oct 1998 13:39:00 GMT
From: wolph@merlin.albany.net (r j huntington)
Subject: Re: File Date/Time Stamp
Message-Id: <7029hk$9b4$1@news.monmouth.com>

: How can I get a file's timestamp in perl? I need to know when
: a file was created and compare it to time() minus some number
: of seconds. Thanks from a perl newbie.	-rh-

Looks like I can answer my own question after all. From 

http://www.perl.com/CPAN-local/doc/manual/html/pod/perlfunc/

The stat function:

($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
       $atime,$mtime,$ctime,$blksize,$blocks)
           = stat($filename);

  0 dev      device number of filesystem
  1 ino      inode number
  2 mode     file mode  (type and permissions)
  3 nlink    number of (hard) links to the file
  4 uid      numeric user ID of file's owner
  5 gid      numeric group ID of file's owner
  6 rdev     the device identifier (special files only)
  7 size     total size of file, in bytes
  8 atime    last access time since the epoch
  9 mtime    last modify time since the epoch
 10 ctime    inode change time (NOT creation time!) since the epoch
 11 blksize  preferred block size for file system I/O
 12 blocks   actual number of blocks allocated




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

Date: Wed, 14 Oct 1998 12:28:17 GMT
From: MCKAYD@aplbt1.agw.bt.co.uk (Dermot McKay)
Subject: Re: NET::FTP problem
Message-Id: <7025nj$cdv$1@pheidippides.axion.bt.co.uk>

In article <36237318.465BD6B1@uninetwork.com>, Mark Cain <mark@uninetwork.com> wrote:
>I am trying to utilize the NET::FTP module in a perl solution.  I can't
>identify the cause of the failure of the following script.  No error
>messages pertaining to this failure are logged on the server.  Can you
>help me identify why this returns "get failed at line ..."  ?
>


I had a similar problem but seems to fix it by reistallation of libnet module

I had to specify that ftp connection was passive in the setup of libnet.

Ok
Dermot


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

Date: Wed, 14 Oct 1998 14:52:58 +0200
From: "Rolf Rettinger" <rolf.rettinger@desy.de>
Subject: Perl and C++ NetUserGetInfo API
Message-Id: <7026sj$jog$1@claire.desy.de>

I would like to get more user information as possible with the perl
Win32::NetAdmin:: UserGetAttributes. Therefore I would like to call the
win32 api, NetUserGetInfo (with the C++ option Net_User_Info_3). Does
anybody know how to do this?

Thanks

Rolf





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

Date: Wed, 14 Oct 1998 13:07:21 +0100
From: Matt Sergeant <msergeant@ndirect.co.uk_NOSPAM>
Subject: Re: Perlscript + IIS + DBI + ODBC + SqlServer
Message-Id: <362493F9.2C3C0A1B@ndirect.co.uk_NOSPAM>

pgweiss@my-dejanews.com wrote:
> 
> I am trying to use ASP with Perlscript to access an
> SqlServer database.  I am using DBI/DBD with the
> DBI::ODBC module to access the database.  I have
> turn the StartConnectionPool setting in the registry
> on so that IIS will use ODBC connection pools.  Here
> is my problem:  soon after my first page which
> accesses the database, Internet Explorer will hang.
> Just plain hang.  Even if I try to access static
> content from the server.  I don't have this problem
> with Netscape, just IE4.  Now when I look on the
> server, I see sockets open to the client in the
> CLOSE_WAIT state?  Does anybody have any clue as
> to what is going on here?

I've not seen this. Do you need it to be cross platform, or could you
switch to using ADO for database access? I've used ADO exclusively on
ASP scripts for over a year now with no such problems.

Also you don't mention which version of ActivePerl you are using? Make
sure you get build 504 as it fixes a number of important bugs.

> Also, I don't seem to be able to get END blocks
> reliably executed from Perlscript.  For example,
> here is an except from a module I use to encapsulate
> database access:

[snip]

>From perlmod:

 An `END' subroutine is executed as late as possible, that is,
 when the interpreter is being exited, ...

In PerlScript the interpreter is persistent. It never exits. I recommend
you go to my web site and take a look at the Win32::ASP module, it has
an "AddDeathHook" function, which allows you to have closures executed
if your script "die"s or "exit"s. I've had a fair amount of success with
it, although you still have to perform your end stuff at the bottom of
your ASP.

-- 
<Matt/>

| Fastnet Software Ltd              |   Perl in Active Server Pages   |
| Perl Consultancy, Web Development |   Database Design   |    XML    |
| http://come.to/fastnet            |    Information Consolidation    |


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

Date: Wed, 14 Oct 1998 05:13:26 +0000
From: "Xah" <xah@best.com>
Subject: Re: prograMing: CompleteIndexSet
Message-Id: <36249355$0$16132@nntp1.ba.best.com>

What I said before about the favoritable characteristics of the proposed solution is incorrect. Rick's follow up was on the spot.

 Xah, xah@best.com
 http://www.best.com/~xah/PageTwo_dir/more.html
 >They fight! They bite! They fight and bite and fight!
 >Fight fight fight! Bite bite bite!
 >The Itchy and Scratchy Show!


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

Date: Wed, 14 Oct 1998 15:47:07 +0100
From: jwl@_munged_worldmusic.de (Joergen W. Lang)
Subject: Re: web_store.cgi
Message-Id: <1dgw8v4.16kngtw12wkppoN@host020-210.seicom.net>

Zeit <zeit@cheerful.com> wrote:

> I am looking for a copy of the above mentioned script.  Does anyone know
> where I might find this script, if there are costs associated, etc?

http://www.altavista.com/cgi-bin/query?pg=q&kl=XX&q=web_store.cgi


hth,

Joergen
-- 
  To reply by email please remove _munged_ from address Thanks !
-------------------------------------------------------------------
   "Everything is possible - even sometimes the impossible"
             HOELDERLIN EXPRESS - "Touch the void"


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

Date: 12 Jul 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 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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