[18862] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1030 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 31 18:06:53 2001

Date: Thu, 31 May 2001 15:05:13 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <991346713-v10-i1030@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 31 May 2001     Volume: 10 Number: 1030

Today's topics:
        access control variable after foreach <jhall@ifxonline.com>
    Re: access control variable after foreach <jhall@ifxonline.com>
        Appending to  a Text file << SilverSting >>" <relpy-to-group@thanx.com>
    Re: Appending to  a Text file (Steven M. O'Neill)
    Re: Appending to  a Text file <james@zephyr.org.uk>
    Re: Appending to  a Text file <hartleh1@westat.com>
    Re: Can't get size value back when using $ftp->size (Anand Sethupathy)
    Re: Frustrated people (not) answering questions <ryantate@OCF.Berkeley.EDU>
    Re: Frustrated people (not) answering questions <lmoran@wtsg.com>
        generating powerpoint presentations in perl (Steven)
    Re: Getting Users' IP <james@NOSPAMPLEASEthesinner.co.uk>
        MLDBM and multiple users. <smrtalec@nospam.earthlink.net>
    Re: MLDBM and multiple users. <smrtalec@nospam.earthlink.net>
    Re: Need help with Regex <james@zephyr.org.uk>
    Re: Need help with Regex <ren@tivoli.com>
        Net::SMTP -- why must I specify recipient twice? (pt)
        Newbie Post : Flushing output for long scripts <bholness@nortelnetworks.com>
    Re: Newbie Post : Flushing output for long scripts <der.prinz@gmx.net>
        OT uploading to remote host with Apache for windows  <davsoming@lineone.net>
    Re: passing arguments to my script from a web browser (Ken)
    Re: Perl request (Abigail)
    Re: Server push and $|? <buggs@geekmail.de>
        tie() losing values jboes@nexcerpt.com
    Re: Time difference including hundreths of seconds <lmoran@wtsg.com>
    Re: Time difference including hundreths of seconds <dennis.kowalsk@daytonoh.ncr.com>
    Re: Time difference including hundreths of seconds <lmoran@wtsg.com>
    Re: Unsure about headers <iltzu@sci.invalid>
    Re: vestale.pl ascii animation (ldb)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 31 May 2001 19:05:38 GMT
From: "John Hall" <jhall@ifxonline.com>
Subject: access control variable after foreach
Message-Id: <6CwR6.12736$%a.851478@news1.rdc1.sdca.home.com>


in:

foreach $var(list) { do stuff; }

How come when i'm done with the foreach loop I can't access "$var". I'd like
to access the last value of $var after the foreach is done.


I know I can do this;

foreach $var(list) { do stuff; $newvar = $var; }

Then access $newvar, but that seems wasteful.

Thanks!


http://moron.shutdown.com




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

Date: Thu, 31 May 2001 19:09:30 GMT
From: "John Hall" <jhall@ifxonline.com>
Subject: Re: access control variable after foreach
Message-Id: <KFwR6.12751$%a.851525@news1.rdc1.sdca.home.com>

Oh, found it;

" If the variable is preceded with the keyword my,
then it is lexically scoped, and is therefore visible only within the
loop. Otherwise, the variable is implicitly local to the loop and
regains its former value upon exiting
the loop. If the variable was previously declared with my, it uses
that variable instead of the global one, but it's still localized to
the loop. (Note that a lexically scoped
variable can cause problems with you have subroutine or format
declarations.) "

So I guess assigning there's no non-wasteful way to do it.

http://moron.shutdown.com

"John Hall" <jhall@ifxonline.com> wrote in message
news:6CwR6.12736$%a.851478@news1.rdc1.sdca.home.com...
>
> in:
>
> foreach $var(list) { do stuff; }
>
> How come when i'm done with the foreach loop I can't access "$var". I'd
like
> to access the last value of $var after the foreach is done.
>
>
> I know I can do this;
>
> foreach $var(list) { do stuff; $newvar = $var; }
>
> Then access $newvar, but that seems wasteful.
>
> Thanks!
>
>
> http://moron.shutdown.com
>
>




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

Date: Thu, 31 May 2001 14:35:19 -0400
From: "<< SilverSting >>" <relpy-to-group@thanx.com>
Subject: Appending to  a Text file
Message-Id: <9f62t9$ee6$1@dns3.cae.ca>

Can anyone tell me how to append text to a file.

My open file code:
open(CLIENTINFO,">client.txt");




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

Date: 31 May 2001 19:18:41 GMT
From: steveo@panix.com (Steven M. O'Neill)
Subject: Re: Appending to  a Text file
Message-Id: <9f65eh$5eg$1@news.panix.com>

 << SilverSting > wrote:
>Can anyone tell me how to append text to a file.
>
>My open file code:
>open(CLIENTINFO,">client.txt");

Ooh, I got one.

   perldoc -q append
-- 
Steven O'Neill                                      steveo@panix.com
                                                   www.cars-suck.org


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

Date: Thu, 31 May 2001 20:20:59 +0100
From: James Coupe <james@zephyr.org.uk>
Subject: Re: Appending to  a Text file
Message-Id: <omraENKbmpF7EwqB@obeah.demon.co.uk>

In message <9f62t9$ee6$1@dns3.cae.ca>, "<< SilverSting >>" 
<relpy-to-group@thanx.com> writes
>My open file code:
>open(CLIENTINFO,">client.txt");

Use ">>filename.txt" instead.

perldoc -f "open"

If the filename begins with >>,
the file is opened for appending, again being created if necessary.


-- 
James Coupe                                                PGP Key: 0x5D623D5D
"You reinstall Dial-Up Networking.  The Elf screams and becomes  EBD690ECD7A1F
an icon. *** CONGRATULATIONS! *** You completed the BT Internet  B457CA213D7E6
Helpdesk training course in 15 out of a possible 9000 moves."   68C3695D623D5D


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

Date: Thu, 31 May 2001 15:27:23 -0400
From: Henry Hartley <hartleh1@westat.com>
Subject: Re: Appending to  a Text file
Message-Id: <3B169B1B.C44C1589@westat.com>

"<< SilverSting >>" wrote:
> 
> Can anyone tell me how to append text to a file.
> 
> My open file code:
> open(CLIENTINFO,">client.txt");

first, you want to be sure the file was opened:

open(CLIENTINFO,">client.txt") || die "Could not open client.txt:
$!\n\n" ;
print CLIENTINFO "A string you want printed to that file\n" ;

You'll want to close the file later but I assume you know how to do
that.

-- 
Henry Hartley


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

Date: 31 May 2001 13:16:41 -0700
From: as@inaday.com (Anand Sethupathy)
Subject: Re: Can't get size value back when using $ftp->size
Message-Id: <a7ad49a1.0105311216.3689385e@posting.google.com>

Sorry about that, here is the cut and paste:

$status = $ftp->size($file);
print "Status: $status\n";

Yes, we are using IIS 4.0 installed from the option pack. 

Any thoughts?



Jeffrey Drumm <jdrumm@blazenetme.net> wrote in message news:<1s1bhtgjjl76vumpp8l9p66ipmvuq9cbq3@4ax.com>...
> [posted to comp.lang.perl.misc]
> 
> On 30 May 2001 14:21:08 -0700, as@inaday.com (Anand Sethupathy) wrote:
> 
> >We have a perl script that transports large data files between Windows
> >and Linux machines. For some reason, we can't seem to read the file
> >size on files that reside on the Windows FTP Server (IIS4.0/NTSP6a).
> >It just returns "" for the size each time. Any thoughts on what might
> >be causing this?
> 
> SIZE has to be implemented on the server for the client to take advantage
> of it. IIS 4.0[1] supports SIZE, but earlier versions of IIS don't. Are you
> absolutely sure you're using IIS 4.0's FTP server?
> 
> >$ftp = Net::FTP->new($get_machine, Debug => 0);
> >$status = $ftp->login($username,$password);
> >print "Getting File\n";
> >$status = $ftp->get($file);
> >print "Status: $status\n";
> 
> I don't see the size() method used anywhere in this script fragment. Hint:
> if you're going to post code, use cut and paste, with actual code that
> exhibits the problem as your source.
> 
> (snip)
> 
> 
> [1]  This is NOT the version supplied in a fresh NT installation, nor are
> you upgraded to it automatically via SP6A. You must install the Option Pack
> to get IIS 4.0.


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

Date: Thu, 31 May 2001 18:28:04 +0000 (UTC)
From: Ryan Travis Tate <ryantate@OCF.Berkeley.EDU>
Subject: Re: Frustrated people (not) answering questions
Message-Id: <9f62fk$2p87$1@agate.berkeley.edu>

brian d foy <comdog@panix.com> wrote:
 | indeed,
 | look at the fecundity of Matt W.'s crap programming.

your use of 'crap' as an adverb and any other rhetorical foibles in
your history of posting to Usenet (to be fair, there may be none! :-)
) do not prevent you from making a meaningful contribition to the
medium.

likewise, Matt's Script Archive makes an important, meaningful
contribution to the Web, even if the Perl isn't idiomatic. at a time
when my knowledge of Perl was at least one order of magnitude smaller
than it is now, i used some of Matt's scripts as templates for writing
other scripts that helped create useful new communities.

i cringe to think what would have happened had i turned to this group
for advice at that time (especially since i didn't know `perldoc` from
[my then favorite text-editor] `pico`)! :-)

cheers
r


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

Date: Thu, 31 May 2001 15:16:32 -0400
From: Lou Moran <lmoran@wtsg.com>
Subject: Re: Frustrated people (not) answering questions
Message-Id: <im5dhtcdr0gfhp95v221av0tbvg9596rfc@4ax.com>

On Thu, 31 May 2001 02:42:03 -0400, brian d foy <comdog@panix.com>
wrote wonderful things about sparkplugs:


>look at the fecundity of Matt W.'s crap programming.
>
I don't know much about Matt W except that he is loathed here.  I do
know a bit about poor crafted information posted to websites.

OLGA (On Line Guitar Archive) comes to mind.  On OLGA people post song
written out in tabulature, more or less, authoratively as the way to
play the song.  They are often VERY wrong.  Wrong key, wrong lyrics,
wrong progression and in some cases they even post the wrong song (The
Allman Bros song One Way Out was actually Eric Clapton's Crossroads on
the site for quite a while.)

anylou...

Point being even if Matt W is as bad as you say he's still helping.

"Oh but then newbies will get bad habits and..." well the newbies have
little in the way of clue anyway, that's why they're newbies.  

As on OLGA even having the song utterly wrong can help.  If one thing
is right then a guitarist can begin from that point and learn.  I
would assume Matt W at his woprst had at least one thing right in his
scripts.  

Maybe his derider's should stop invoking his name.

my $.02
--
BSOD? In my day we didn't have 0000FF!
lmoran@wtsg.com


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

Date: 31 May 2001 13:52:12 -0700
From: steve.busiello@gs.com (Steven)
Subject: generating powerpoint presentations in perl
Message-Id: <fa45b871.0105311252.7c6bddab@posting.google.com>

Has anyone ever heard of powerpoint presentations being generated by a
module. I checked cpan, and the news groups and did many searchs on
google and the like...

I know that PP can open HTML files ... any ideas are appreciated

thanx

-Steven


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

Date: Thu, 31 May 2001 22:15:16 +0100
From: "James" <james@NOSPAMPLEASEthesinner.co.uk>
Subject: Re: Getting Users' IP
Message-Id: <9f6cfg$ad6$1@phys-ma.sol.co.uk>


"Peter Reid" <peter.reid2000@ntlworld.com> wrote in message
news:1103_991306344@peterrei...
> I had been using
>
> my $userip=remote_host;
>
> to store the IP address of everyone submitting entries to my guestbook.
When it came to making a complaint to an ISP, they said I was recording the
IP of their proxy
> server and not of the person who had abused my guestbook.

I too have this problem. Suggestions I have recieved include using server
side includes to get the IP of the local machine and using headers to tell
the proxy server not to cache pages. Both sound like complete non starters
to me . . .

James.





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

Date: Thu, 31 May 2001 18:05:04 GMT
From: "R" <smrtalec@nospam.earthlink.net>
Subject: MLDBM and multiple users.
Message-Id: <kJvR6.6194$651.428871@newsread1.prod.itd.earthlink.net>


what is the best approach using a multiple concurrent user program using
MLDBM to handle a data file.
i've been searching cpan for info on the module but not havingmuch luck .

below is my current line.  does this have built in flocking to prevent file
corruptionin a multi-user env. ?
tie (%data, 'MLDBM',$file, O_RDWR|O_CREAT, 0666) || die "error unable to
open file $!";

thanks




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

Date: Thu, 31 May 2001 18:13:16 GMT
From: "R" <smrtalec@nospam.earthlink.net>
Subject: Re: MLDBM and multiple users.
Message-Id: <0RvR6.6200$651.430691@newsread1.prod.itd.earthlink.net>


R <smrtalec@nospam.earthlink.net> wrote in message
news:kJvR6.6194$651.428871@newsread1.prod.itd.earthlink.net...
>
> what is the best approach using a multiple concurrent user program using
> MLDBM to handle a data file.
> i've been searching cpan for info on the module but not havingmuch luck .
>
> below is my current line.  does this have built in flocking to prevent
file
> corruptionin a multi-user env. ?
> tie (%data, 'MLDBM',$file, O_RDWR|O_CREAT, 0666) || die "error unable to
> open file $!";
>
> thanks
>
>

i'm realizing this is a vague post.  what I am concerened about is. the way
my script is contructed once the tie is initialized the file may be not
accesable to other users. what is the appropriate way to address this. ?




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

Date: Thu, 31 May 2001 21:04:41 +0100
From: James Coupe <james@zephyr.org.uk>
Subject: Re: Need help with Regex
Message-Id: <6EL+MhNZPqF7Ew7p@obeah.demon.co.uk>

In message <3B165DD9.EDAAEAC0@yahoo.com>, chquek <chquek@yahoo.com>
writes
>I have a string of the following format :
>
>    A,"123,456,789.00","345,234,456.11",D,E
>
>what i want is :
>
>    A,123456789.00,345234456.11,D,E

One "simple" way would be to use Jeffrey Friedl's comma separated
variable regex from Mastering Regular Expressions, splitting it into an
array.

        @fields = ();
        while ($blah #~ m/"([^"\\]*(\\.[^"\\]*)*)",?|([^,]+),?|,/g)
        { push (@fields, defined($1) ? $1 : $3); }
        push (@fields, undef) if $blah =~ m/,$/;

Then loop through that array, removing the commas from the numbers
(you're not in danger of removing them from between items now).

Then join the array back together, as necessary.

-- 
James Coupe                                                PGP Key: 0x5D623D5D
"You reinstall Dial-Up Networking.  The Elf screams and becomes  EBD690ECD7A1F
an icon. *** CONGRATULATIONS! *** You completed the BT Internet  B457CA213D7E6
Helpdesk training course in 15 out of a possible 9000 moves."   68C3695D623D5D


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

Date: 31 May 2001 15:12:54 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: Need help with Regex
Message-Id: <m3pucpuvjt.fsf@dhcp9-180.support.tivoli.com>

On 31 May 2001, anno4000@lublin.zrz.tu-berlin.de wrote:

>> chquek wrote:
>> > Hi :
>> >
>> > I have a string of the following format :
>> >
>> >     A,"123,456,789.00","345,234,456.11",D,E
>> >
>> > what i want is :
>> >
>> >     A,123456789.00,345234456.11,D,E
>> >
>> > I know how to extract and remove the double quotes "  with
>> >
>> >   s/"(.+?)"/$1/g
>> >
>> > but how do I remove the commas in $1   ???
> 
> To the OP: There are modules on CPAN that deal with data of this
> type.  You're looking for the keyword CSV for comma-separated
> values.

Note that if the format is as explicit as given, then you could use
something like:

  s/"(.+?)"/(my $num=$1) =~ tr|,||d; $num/ge;

But you should probably have a look at the CSV modules anyway.

-- 
Ren Maddox
ren@tivoli.com


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

Date: 31 May 2001 14:15:15 -0700
From: mnemotronic@yahoo.com (pt)
Subject: Net::SMTP -- why must I specify recipient twice?
Message-Id: <da662010.0105311315.34fb43dd@posting.google.com>

The example for Net::SMTP show the recipient being specified twice:

$smtp->mail($ENV{USER});
$smtp->to('postmaster');
$smtp->data();
$smtp->datasend("To: postmaster\n");
[snip]

   I'm guessing the 'to' method does the SMTP "RCPT TO:", while the
'datasend' does the SMTP "To" header.  Are both necessary?  Does this
have something to do with "forward path" and "relaying" per RFC 821
(which I obviously haven't memorized).


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

Date: Thu, 31 May 2001 17:55:53 +0100
From: "Ben Holness" <bholness@nortelnetworks.com>
Subject: Newbie Post : Flushing output for long scripts
Message-Id: <9f5t6m$17a$1@qnsgh006.europe.nortel.com>

Hi,

I am sure this should be in the FAQ, but I couldn't for the life of me find
it!

I have a perl script that takes about 2 or 3 minutes to run (lots of slooow
database interactions).

I would like to give something to my users to show that it is actually
running.

Just a few words at the top of the page that say "Script is running, please
be patient" would be fine.

I put this in a print statement, but that doesn't seem to get to the browser
until the whole script is finished, or the user presses stop. Is there any
way to force it out while the script is still running?

Cheers,

Ben




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

Date: Thu, 31 May 2001 21:10:53 +0200
From: "Stefan Weiss" <der.prinz@gmx.net>
Subject: Re: Newbie Post : Flushing output for long scripts
Message-Id: <3b169785@e-post.inode.at>

Ben Holness <bholness@nortelnetworks.com> wrote:

> I put this in a print statement, but that doesn't seem to get to the browser
> until the whole script is finished, or the user presses stop. Is there any
> way to force it out while the script is still running?

Yes.
$| = 1;
see `perldoc perlvar`

cheers,
stefan





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

Date: Thu, 31 May 2001 21:31:38 +0100
From: "David Soming" <davsoming@lineone.net>
Subject: OT uploading to remote host with Apache for windows 
Message-Id: <thda5ral6img1c@corp.supernews.co.uk>

Sorry if this is OT but I'm looking for a 'hand-holding' tutorial to access
my remote host
for uploading and setting permissions .htaccess + htpasswd (user
authentication) using apache for windows v1.3.9. IE. from my local machine
to the remote address. I wish to properly protect my directories. This is
not possible using FTP, (will always return error attempting to set up these
files .htaccess + .htpasswd --without Telnet--using FTP clients)
Anyone know of any resources other than the following:
http://www.apacheweek.com/features/userauth
http://httpd.apache.org

BTW my isp dont carry any apache newsgroups nor do I have telnet
Thanks for any info! - sorry to be OT
David






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

Date: 31 May 2001 14:49:35 -0700
From: kenphilbrick@mindspring.com (Ken)
Subject: Re: passing arguments to my script from a web browser
Message-Id: <f8b445c0.0105311349.5e779486@posting.google.com>

All you have to do is have "use CGI;" somewhere at the top of your script,
and then you can get the parameters that were passed to your script by using
the param() function.  So if your script was accessed via the URL
"script.pl?a=1&b=2&c=3" then param('a') returns 1 and param('b') returns 2, etc.

--
Ken


"Marcel Reuvekamp" <m.h.a.reuvekamp@student.utwente.nl> wrote in message news:<9f5lhl$ac2$1@dinkel.civ.utwente.nl>...
> Hi all,
> 
> I've made myself a script which gets some arguments. It works just fine if I
> give them from the commanline, but then there's the problem. I want to use
> it in my browser. So there's my question, does anyone know how I can pass
> some arguments from my browser to my script?
> 
> thanks,
> Marcel


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

Date: Thu, 31 May 2001 21:58:33 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: Perl request
Message-Id: <slrn9hdfk9.ee1.abigail@tsathoggua.rlyeh.net>

Bart Lateur (bart.lateur@skynet.be) wrote on MMDCCCXXIX September
MCMXCIII in <URL:news:akmaht824g10v7cl866enf7jss7jgsudn1@4ax.com>:
~~  Teffy wrote:
~~  
~~ >I need a "program" that will delete those files in ORIGINALS that
~~ >don't appear in KEEPERS.
~~ >  for example, after the "program" runs, ORIGINALS will contain:
~~ >  pic_002.raw
~~ >  pic_002.thm
~~  
~~  Go through all the files in the ORIGINAL directory. Drop the directory
~~  path and the file extension. Check if the file exists in KEEPERS with
~~  the ".jpg" extension. If it doesn't, unlink the file-under-test.

Well, since there is already a "review" program deleting files in KEEPERS,
it should be much easier to modify the review program and deleting the
files from ORIGINAL.

If the review program is written in Perl, it should take one or two
additional lines.



Abigail
-- 
perl -wle '$, = " "; sub AUTOLOAD {($AUTOLOAD =~ /::(.*)/) [0];}
           print+Just (), another (), Perl (), Hacker ();'


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

Date: Thu, 31 May 2001 20:31:21 +0200
From: buggs <buggs@geekmail.de>
Subject: Re: Server push and $|?
Message-Id: <9f62i1$hi9$03$1@news.t-online.com>

BCC wrote:

> CGI::Push does not work with Internet Explorer, as stated in the docs :(
> Bummer.  Im looking into client pull or a javascript timed reload instead.

Don't believe in docu, especially outdated,
not mentioning any version numbers ones.

Again, have you *tried* CGI::Push ? ;-)

If you use Apache 1.3.xx be sure to pass  "-nph => 0".

Buggs


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

Date: 31 May 2001 19:41:11 GMT
From: jboes@nexcerpt.com
Subject: tie() losing values
Message-Id: <9f66on$evk$1@news.netmar.com>


I'm exploring tied hashes, and have run into something that puzzles me. I'm
tying a hash so that I can "restrict" which hash keys are valid
(basically,
the hash represents a database table's row, and I don't want to allow
creating new keys or accessing non-existant ones without a very specific
warning message being emitted).

E.g.,

# table emp has 3 fields: emp_id, name, ssn

my $row = emp_row->new();

print keys %$row;  # results in emp_id name ssn
$row->{name} = 'Jeff';  # OK
$row->{gender} = 'M';  # BZZT! generates a warning 'no such field
"gender" in
"emp"'

My class implements FETCH, STORE, and TIEHASH. I have followed my code
through
the debugger so I know it's being invoked. The STORE method correctly inserts
values in the @row{keys...} statement. But when I get to the final statement,
there's nothing in the hash (all values are undefined--the keys are still
there). What am I doing wrong?

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

require Tie::Hash;
our @ISA = qw(Tie::StdHash);

sub FETCH {
  my $record = shift;
  my $table = ref($record);
  my $field = shift;
  my $value;
  unless (exists $record->{$field}) {
    carp "no such field $field in $table";
    return undef;
  } else { return $value }
}

sub STORE {
  my $record = shift;
  my $table = ref($record);
  my $field = shift;
  my $value = shift;
  unless (exists $record->{$field}) {
    carp "no such field $field in $table";
    return undef;
  } else { $record->{$field} = $value; return $value }
}

sub TIEHASH {
  my $table = shift;
  # Get the column names for this table.
  my $cols = [qw( emp_id name ssn )];

  # Build a row.
  my %record;
  @record{@$cols} = (undef) x @$cols;
  return bless \%record, $table;
}

my %row;

tie %row, __PACKAGE__;

print $row{foo}, "\n";

@row{keys %row} = qw(a b c);

print $row{name}, "\n";





 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net


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

Date: Thu, 31 May 2001 14:09:43 -0400
From: Lou Moran <lmoran@wtsg.com>
Subject: Re: Time difference including hundreths of seconds
Message-Id: <462dhtg1hrjgpl7ih58pdctjhpsjgka5jp@4ax.com>

On Thu, 31 May 2001 13:46:41 -0400, "Dennis Kowalski"
<dennis.kowalsk@daytonoh.ncr.com> wrote wonderful things about
sparkplugs:

>Does anyone know of a routine that will return the difference between two
>times including hundreths of seconds?
>
>I know about time and timelocal but they both return just seconds.
>I am looking for something with a finer granularity than that.
>
>I guess what I want is a routine that will return ss and hs
>
>Thanks
>
perldoc -f time will answer this question!

--
BSOD? In my day we didn't have 0000FF!
lmoran@wtsg.com


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

Date: Thu, 31 May 2001 15:25:00 -0400
From: "Dennis Kowalski" <dennis.kowalsk@daytonoh.ncr.com>
Subject: Re: Time difference including hundreths of seconds
Message-Id: <3b169a8a$1@rpc1284.daytonoh.ncr.com>


Lou Moran <lmoran@wtsg.com> wrote in message
news:462dhtg1hrjgpl7ih58pdctjhpsjgka5jp@4ax.com...
> On Thu, 31 May 2001 13:46:41 -0400, "Dennis Kowalski"
> <dennis.kowalsk@daytonoh.ncr.com> wrote wonderful things about
> sparkplugs:
>
> >Does anyone know of a routine that will return the difference between two
> >times including hundreths of seconds?
> >
> >I know about time and timelocal but they both return just seconds.
> >I am looking for something with a finer granularity than that.
> >
> >I guess what I want is a routine that will return ss and hs
> >
> >Thanks
> >
> perldoc -f time will answer this question!
>
> --
> BSOD? In my day we didn't have 0000FF!
> lmoran@wtsg.com

Here is what perldoc -f time tells me on my system

Returns the number of non-leap seconds since whatever time the system
considers to be the epoch (that's 00:00:00, January 1, 1904 for MacOS,
and 00:00:00 UTC, January 1, 1970 for most other systems).
Suitable for feeding to C<gmtime()> and C<localtime()>.

That indicate whole seconds only.





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

Date: Thu, 31 May 2001 15:45:07 -0400
From: Lou Moran <lmoran@wtsg.com>
Subject: Re: Time difference including hundreths of seconds
Message-Id: <vo7dhtgud6clvcbsgvrmp0h3puitq0gva2@4ax.com>

On Thu, 31 May 2001 15:25:00 -0400, "Dennis Kowalski"
<dennis.kowalsk@daytonoh.ncr.com> wrote wonderful things about
sparkplugs:

SNIP
>
>Here is what perldoc -f time tells me on my system
>
>Returns the number of non-leap seconds since whatever time the system
>considers to be the epoch (that's 00:00:00, January 1, 1904 for MacOS,
>and 00:00:00 UTC, January 1, 1970 for most other systems).
>Suitable for feeding to C<gmtime()> and C<localtime()>.
>
>That indicate whole seconds only.

What about this part?

For measuring time in better granularity than one second, you
may use either the Time::HiRes module from CPAN, or if you have
gettimeofday(2), you may be able to use the `syscall' interface
of Perl, see the perlfaq8 manpage for details.


>

--
BSOD? In my day we didn't have 0000FF!
lmoran@wtsg.com


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

Date: 31 May 2001 19:37:18 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Unsure about headers
Message-Id: <991337589.15703@itz.pp.sci.fi>

In article <j5gR6.5256$25.18907@news1.eburwd1.vic.optushome.com.au>, Rob wrote:
><cut>
>Good point!

What is?

Either you honestly took the advice to trim unnecessary quotes with a
bit too much enthusiasm, or you're trying to be sarcastic.  Either way,
the point you're missing is that one should trim what is unimportant
_and_ keep what is important.  You _can_ tell those apart, can't you?

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla / Kira -- do not feed the troll.


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

Date: Thu, 31 May 2001 18:40:26 GMT
From: shedragon@lycos.com (ldb)
Subject: Re: vestale.pl ascii animation
Message-Id: <3b168ff7.22981689@news.onemain.com>

We're reading your message. No one is answering because no one seems
to have an answer. 

On 31 May 2001 08:06:07 -0700, alain_s75@hotmail.com (Alain) wrote:

>One more time
>(we gone celebrate)
>alain_s75@hotmail.com (Alain) wrote in message news:<329469e4.0105300339.65010060@posting.google.com>...
>> Trying again ...
>> 
>> alain_s75@hotmail.com (Alain) wrote in message news:<329469e4.0105250016.56b597eb@posting.google.com>...
>> > Hello all,
>> > 
>> > I am looking for an ascii animation that was posted here around 94/95,
>> > it was in the form of a simple VT file and of a self compressed 3 or 4
>> > pages perl program.
>> > The title of the animation was "vestale sous contraintes, exercice
>> > ludique en courier 10", and the name of the perl program "vestale.pl".
>> > I am the author of it and somehow I lost the files in the mess of my
>> > disks !!!
>> > 
>> > If someone still has it, I would really be greatful if they could
>> > forward it to me.
>> > Thanks in advance.
>> > alain_s75@hotmail.com


   \_/      http://www.geocities.com/theshedragon/
 --(_)--
   / \     |>  v-v-v-v   |>
   ,   ,  /_\  |     |  /_\
   |\_/|  | |'''''''''''| |          |\
   (q p),-| | ||  _  || | |'-._       ))
    \_/_(/| |    |#|    | | )  '-.___//
  --w-w---'-'----'-'----'-'----------'-----------ldb---


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

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

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 V10 Issue 1030
***************************************


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