[10269] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3862 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 30 22:07:11 1998

Date: Wed, 30 Sep 98 19:00:19 -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, 30 Sep 1998     Volume: 8 Number: 3862

Today's topics:
    Re: 10 SEP 1998 ==> 1998-09-10 (Alan Barclay)
    Re: associative array collisions (Mark-Jason Dominus)
    Re: can't find loadable module? help.. <wweng@attila.stevens-tech.edu>
        CGI and file uploading (Timothy Church)
    Re: Date (Steffen Beyer)
        Erasing read mail, with POP3 Client module? (Joe Novielli)
    Re: Execute perl on win32 with no console? (Martin Oakley)
    Re: How do I do this c-ish pointerly thing in perl? (Abigail)
        HTTPS URL Help <danone@NOSPAMwestern.wave.ca>
    Re: I hate it when I do that. <jdf@pobox.com>
    Re: lightweight date checker NOT DATE::MANIP (Steffen Beyer)
    Re: need a regular expressions expert.... <jhpark@james.amherst.edu>
    Re: need a regular expressions expert.... <work@despam.idea.co.uk>
    Re: perl 5 on Freebsd - dbm Problems <kliquori@ix.netcom.com>
    Re: perl 5 on Freebsd - dbm Problems <zenin@bawdycaste.org>
        Premature end of script headers (steve)
    Re: Premature end of script headers <rootbeer@teleport.com>
        Seeking FTP over HTTP with Perl kenn@owl.co.uk
    Re: send geroge reese (was Re: Call for Participation:  (Larry Wall)
    Re: soft reference to object? (Sean McAfee)
    Re: Some kind of 'real' user interface? (Rich)
        UNIVERSAL doesn't work how I'd expect (William R. Ward)
        Using the Perl 'format' to STDOUT drschimpf@my-dejanews.com
        Win32, Net::Ping and alarm (Mike Starkweather)
        Word wrap for Perl <thealienz@killkenny.com>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 1 Oct 1998 00:47:58 GMT
From: gorilla@elaine.drink.com (Alan Barclay)
Subject: Re: 10 SEP 1998 ==> 1998-09-10
Message-Id: <907202876.554507@elaine.drink.com>

In article <u4stp3bg9.fsf@vansel.alcatel.com>,
Brad Murray  <murrayb@vansel.alcatel.com> wrote:
>Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at> writes:
>
>> Re: 10 SEP 1998 ==> 1998-09-10, Claes-Goran
>> <c-g-magn@dsv.su.se> said:
>> 
>> Claes-Goran> I am trying to convert $rest which consist of a
>> Claes-Goran> date in the form DD MMM YYYY (10 SEP 1998). I
>> Claes-Goran> want to print it as YYYY-MM-DD (1998-09-10).
>> 
>> perldoc Date::Manip
>> perldoc Date::DateCalc
>> perldoc POSIX (strftime)
>
>Or, without loading a lot of modules in order to do a simple transformation:
>
>%months=( JAN => 1, FEB => 2, MAR => 3, APR => 4, MAY => 5,
>          JUN => 6, JUL => 7, AUG => 8, SEP => 9, OCT => 10,
>          NOV => 11,DEC => 12 );
>
>$rest = "10 SEP 1998";    # or however you need to get your $rest
>
>($day,$month,$year) = split ' ', $rest;
>printf "%s-%0.2d-%0.2d",$year,$months{$month},$day;

You can do it in one regex:

#!/usr/local/bin/perl -w

%months = ( 'JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04',
            'MAY' => '05', 'JUN' => '06', 'JUL' => '07', 'AUG' => '08',
            'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12',);

$rest="10 SEP 1998";

$rest =~ s[(\d*) ([A-Z]*) (\d*)]
          [$3-$months{$2}-$1];
print $date,"\n";


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

Date: 30 Sep 1998 21:08:06 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: associative array collisions
Message-Id: <6uuklm$ot4$1@monet.op.net>

In article <3612669A.527D4C54@nervana.montana.edu>,
Sandy Pittendrigh  <sandy@nervana.montana.edu> wrote:
>How does the hashing of associative array labels
>work in perl?

The hash table has N buckets, initially 8.  Each bucket is a linked
list of structures, and each structure has a pointer to the hash key
(a string) and the hash value (a Perl `SV').

The hash value is computed from the key as follows:

	H = 0;
	foreach character c in the hash key {
		H = H * 33 + c;
	}
	H = H % N;

This identifies bucket #H and its linked list.  Perl searches the list
sequentially, comparing the key in each note with the hash key it is
seeking.  If it finds it, it returns the associated SV; otherwise, it
fails.  

Whenever an item it put into an empty bucket, Perl checks to see if
the number of items in the table is larger than N.  If it is, the
entire table is reallocted with 2N buckets, and all the keys are
reinstalled.

>What the chances that two unique labels will hash to the same address?

For uniformly selected keys, the chance is 1/N, but N varies over the
lifetime of the hash.  In the worst case, of course, all the keys
collide, and you get a hash with 7 empty buckets and one linked list
which is searched sequentially for every key.

	<URL:http://www.plover.com/~mjd/perl/#badhash>

is an example program that demonstrates this.

This description is not completely accurate in the details.  See
`hv.c' and `hv.h' for the truth.


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

Date: 30 Sep 1998 23:26:38 GMT
From: Wei Weng <wweng@attila.stevens-tech.edu>
Subject: Re: can't find loadable module? help..
Message-Id: <6uuene$13c$1@apocalypse.dmi.stevens-tech.edu>

how would I know about it?
And can i install it in my account without root priviledge?

Honza Pazdziora <adelton@fi.muni.cz> wrote:
> On 30 Sep 1998 21:37:57 GMT, Wei Weng <wweng@attila.stevens-tech.edu> wrote:
>> Hi all 
>> I was trying to access Oraperl module installed on school server.
>> But everytime I tried to access it, it gave me error:"  
>> Can't find loadable object for module DBI in @INC
>> (/opt/gnu/lib/perl5/site_perl /usr/share/lib/perl5/irix-n32/5.003
>> /usr/share/lib/perl5 /usr/share/lib/perl5/site_perl/irix-n32
>> /usr/share/lib/perl5/site_perl .) at /opt/gnu/lib/perl5/site_perl/DBI.pm
>> line 81
>> 
>> The oraperl.pm file is in /opt/gnu/lib/perl5/site_perl directory. And I
>> already set up PERL5LIB to /opt/gnu/lib/perl5/site_perl

> The module is not installed properly. Are you sure that whoever
> installed the module did more than just copy the *.pm file somewhere?
> Oraperl needs (IMHO) to be compiled.

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

-- 
Wei Weng 
--- May star fall upon you ---
			


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

Date: Thu, 01 Oct 1998 01:06:21 GMT
From: tNOchurch@gmuSPAM.eduALLOWED (Timothy Church)
Subject: CGI and file uploading
Message-Id: <3612d54b.18546724@news.newsguy.com>

I have tried to use the example from the CGI book on pg 152, but can't
seem to get my script to read the file.  Does anyone have an example
that works?


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

Date: 30 Sep 1998 12:55:32 GMT
From: sb@engelschall.com (Steffen Beyer)
Subject: Re: Date
Message-Id: <6ut9o4$fqg$1@en1.engelschall.com>

cim@online.ee wrote:

> How can i accurately get tomorrows and day after tomorrows date.
> Simply adding +1 or +2 to todays number will not do.
> The same goes for yesterday. I could define the max number of days for
> each month, but February on some years...!?!?
> Any simple methods?

Perl modules are your friend!

See http://www.perl.com/CPAN/modules/by-module/Date/ for a choice of modules
dealing with date calculations.

Yours,
-- 
    Steffen Beyer <sb@engelschall.com>
    Free Perl and C Software for Download: www.engelschall.com/u/sb/download/


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

Date: Wed, 30 Sep 1998 20:19:57 GMT
From: jnoviell@matrox.com (Joe Novielli)
Subject: Erasing read mail, with POP3 Client module?
Message-Id: <35eaffcb.1046743287@news.matrox.com>

Does anyone know a way to erase read mail with the POP3 module. (ie:
Mail::POP3Client).

I have a cgi script that can read the messages, but I don't know how I
can delete them after they've been read.

Joe



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

Date: Wed, 30 Sep 1998 23:58:55 GMT
From: martin.oakley@usa.net (Martin Oakley)
Subject: Re: Execute perl on win32 with no console?
Message-Id: <3612b898.1120131@news.bne.aone.net.au>

Thanks, but the scripts are pre and post event triggers. I cant have
the event happening before the pre-event trigger has completed. 


grueni@stuttgart.netsurf.de (Andreas Grueninger) wrote:

>On Wed, 30 Sep 1998 05:11:31 GMT, martin.oakley@usa.net (Martin
>Oakley) wrote:
>
>>Can perl scripts be executed without a console process?
>>
>
>If you use NT (you wrote only Win32):
>You may use the AT command or better SOON of the nt resource kit to
>start the perl jobs in the background without the interactive switch.
>You hve to be sure that the jobs will end an not wait for some user
>input.
>Of course a background job uses cpu time and the users will have less
>cpu time for the foreground jobs (see control panel->system-> ration
>between background and foreground processing))
>---------------------------
>Andreas Grueninger
>
>PRIVATE: grueni@stuttgart.netsurf.de
> OFFICE: grueninger@lfl.bwl.de
>---------------------------



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

Date: 30 Sep 1998 23:39:10 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: How do I do this c-ish pointerly thing in perl?
Message-Id: <6uufeu$83m$1@client3.news.psi.net>

Ken Fox (kfox@pt0204.pto.ford.com) wrote on MDCCCLVI September MCMXCIII
in <URL:news:6uu6q9$bd6@eccws1.dearborn.ford.com>:
++ mcafee@waits.facilities.med.umich.edu (Sean McAfee) writes:
++ > Jedediah D. Parsons <jed@glug.hip.berkeley.edu> wrote:
++ > > What's a perl equivalent for this?:
++ > > while (*a != '\0') do_something_with(a++);
++ >
++ > while ($a =~ /(.)/gs) {
++ >    do_something_with($1);
++ > }
++ 
++ Your example doesn't stop on a NUL.  I don't know if this is
++ important, but a lot of C string handling code doesn't grok NUL.

Yeah, and it doesn't wonder off to worlds where no men has gone before
either if it doesn't find a NUL in the string.



Abigail
-- 
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))


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

Date: 30 Sep 1998 22:54:08 GMT
From: "Dan O." <danone@NOSPAMwestern.wave.ca>
Subject: HTTPS URL Help
Message-Id: <01bdecc5$8c453460$1015b7d1@danoneill.western.wave.ca>


I've made a script to test for valid URLs using LWP but it doesn't work for
https:// addresses. Can anyone tell me how to test them? 

The code I'm using is:

my $ua = new LWP::UserAgent;

my $request = new HTTP::Request('HEAD',$dest);
my $response = $ua->request($request);

if ($response->is_success){
  ...

Thanks,

Dan O.


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

Date: 01 Oct 1998 02:05:42 +0200
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: I hate it when I do that.
Message-Id: <m3emstqh7t.fsf@joshua.panix.com>

aml@world.std.com (Andrew M. Langmead) writes:

> Jonathan Feinberg <jdf@pobox.com> writes:
> 
> >I'd say that once a day, on average, I write this:
> 
> >  $foo = s/something/something else/;
> 
> For this particular problem, would the UnderScore.pm module in the
> Perl Cookbook help? Or are there too many places that you do use $_.
> 
>   no UnderScore;

Eewww. I certainly do use implicit $_ all the time. I can't imagine
Perl without it. No; I wasn't really looking for a way to not make
that mistake... I was just complaining! I should say, though, that
I haven't made that mistake since posting about it.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf


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

Date: 30 Sep 1998 12:43:28 GMT
From: sb@engelschall.com (Steffen Beyer)
Subject: Re: lightweight date checker NOT DATE::MANIP
Message-Id: <6ut91g$e2i$2@en1.engelschall.com>

[Complimentary Cc sent to cited author via mail]

mizpoon@my-dejanews.com wrote:

> hi there. I'm looking for a very quick function to confirm whether a date is a
> valid one. basically I want to check if '2/31/1998' is a valid date or not.

> currently I'm using Date::Manip to do this, but this module is HUGE and takes
> a considerable amount of time to return.

> does anyone else know a cheap alternative to this?

Why don't you use the module "Date::Calc" instead?

It's meant to be a *toolbox*, not a bulky ready-made application, so it's
*slim*, and it is also *fast* because it is written in C internally.

It compiles out of the box on all usual UNIX and also on Win32 platforms.

It is available either from CPAN (http://www.perl.com/CPAN/authors/id/STBEY/)
or from my web site at http://www.engelschall.com/u/sb/download/.

HTH.

Yours,
-- 
    Steffen Beyer <sb@engelschall.com>
    Free Perl and C Software for Download: www.engelschall.com/u/sb/download/


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

Date: 1 Oct 98 00:31:47 GMT
From: James Park <jhpark@james.amherst.edu>
Subject: Re: need a regular expressions expert....
Message-Id: <3612cd73.0@amhnt2.amherst.edu>

Abigail <abigail@fnx.com> wrote:
: If you can't be bothered to read the group, the answer to your question
: can't be important to you.

Maybe he knows that his news server sometimes loses posts, and would like
to avoid scanning DejaNews when it would be just as easy for people to
cc him replies...

				--James
-- 
Does anybody go to the Grand Canyon to enhance their self-esteem?
				--John Piper


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

Date: Thu, 01 Oct 1998 02:41:55 +0100
From: Kiril <work@despam.idea.co.uk>
Subject: Re: need a regular expressions expert....
Message-Id: <3612DDE3.9CC5C079@despam.idea.co.uk>

Uri Guttman wrote:

<snip>

> i actually agree. i am trying to get the proper usage and definition
> down. but i want it to be more than wanton disregard. general
> irrationality should be covered by the term. but newbie innocence could
> be an excuse not to use it.
> 
> uri
> 
> --

Well, FWIW, this post of yours was very un-reesy..
(un-reesey?)


Kiril


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

Date: Wed, 30 Sep 1998 19:22:51 -0400
From: Kevin Liquori <kliquori@ix.netcom.com>
Subject: Re: perl 5 on Freebsd - dbm Problems
Message-Id: <3612BD4B.1C122907@ix.netcom.com>

Thanks for the help. What I ended up doing was getting the full ports tar. I
ran the
make, etc for perl. The make kept crashing saying it couldn't find the tar and
a few
other errors. I got around some of them (NO_CHECKSUM=yes, changing the path to
the tar
in the Makefile). The make install never finished. After I gave up I went back
to my
perl scripts and  --- THEY WORKED!!! DBM and all! So I guess enough of the
make ran to
fix my problem.
    Here's my new question: If I get a package from the FreeBSD ftp site,
gunzip it,
and then tar xvf it - isn't that enough? Must I run the port's make and
configure? My
lynx install was much easier. Also, should these un-tarred files always go in
a
particular file system (like /usr/local/packages)? There doesn't seem to be
much
documentation on packages themselves in the Handbook.

Finally, here's the script I was trying to run (from Schwartz's _Learning
Perl_):

#!/usr/bin/perl

init_words();
print "what is your name? ";
$name = <STDIN>;
chomp($name);
if ($name =~ /^randal\b/i) { # back to the other way :-)
    print "Hello, Randal! How good of you to be here!\n";
} else {
    print "Hello, $name!\n"; # ordinary greeting
    print "What is the secret word? ";
    $guess = <STDIN>;
    chomp $guess;
    while (! good_word($name,$guess)) {
        print "Wrong, try again. What is the secret word? ";
        $guess = <STDIN>;
        chomp $guess;
    }
}
dbmopen (%last_good,"lastdb",0666);
$last_good{$name} = time;
dbmclose (%last_good);
sub init_words {
    while ($filename = <*.secret>) {
        open (WORDSLIST, $filename)||
                              die "can't open $filename: $!";
        if (-M WORDSLIST < 7.0) {
            while ($name = <WORDSLIST>) {
                chomp ($name);
                $word = <WORDSLIST>;
                chomp ($word);
                $words{$name} = $word;
            }
        } else { # rename the file so it gets noticed
            rename ($filename,"$filename.old") ||
                          die "can't rename $filename.old: $!";
        }
        close WORDSLIST;
    }
}
sub good_word {
    my($somename,$someguess) = @_; # name the parameters
    $somename =~ s/\W.*//; # delete everything after first word
    $somename =~ tr/A-Z/a-z/; # lowercase everything
    if ($somename eq "randal") { # should not need to guess
        return 1; # return value is true
    } elsif (($words{$somename} || "groucho") eq $someguess) {
        return 1; # return value is true
    } else {
        open (MAIL, "|mail YOUR_ADDRESS_HERE");
        print MAIL "bad news: $somename guessed $someguess\n";
        close MAIL;
        return 0; # return value is false
    }
}


TIA . . . Kevin


Zenin wrote:

> Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> wrote:
> : dbm is not installed with the Perl and not always installed with the OS.
>
>         Perl *always* ships with SDBM, reguardless of the OS.
>
>         FreeBSD natively has Berkeley DB (DB_File).
>
> : Also, gdbm is not the same as dbm. Did you read the README?
>
>         Doesn't matter.  dbmopen() and friends use AnyDBM_File, which
>         will always look for DB_File, GDBM_File, and SDBM_File (among
>         others) unless you explicitly tell it otherwise.
>
>         For the original poster, could you show us a small (but complete)
>         code snip that demonstrates your problem?
>
> --
> -Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
> BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
> Berkeley or thereabouts.  Similar in many ways to the prescription-only
> medication called "System V", but infinitely more useful. (Or, at least,
> more fun.)  The full chemical name is "Berkeley Standard Distribution".
>



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

Date: 1 Oct 1998 00:49:58 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: perl 5 on Freebsd - dbm Problems
Message-Id: <907202918.717834@thrush.omix.com>

Kevin Liquori <kliquori@ix.netcom.com> wrote:
: Thanks for the help. What I ended up doing was getting the full ports tar.

	The full ports collection?  The first time you do this, it should
	be from /stand/sysinstall.  In the base system, pick "The FreeBSD
	Ports Collection".  Custom->Distrobutions->Custom->ports

: I
: ran the make, etc for perl. The make kept crashing saying it couldn't find the
: tar and a few other errors. I got around some of them (NO_CHECKSUM=yes, changing
: the path to the tar in the Makefile). The make install never finished.

	You've got something very wrong going on.  You should never have to
	jump through so many hoops (or any for that matter) to build a port.

:     Here's my new question: If I get a package from the FreeBSD ftp site,
: gunzip it, and then tar xvf it - isn't that enough?

	A port has two pieces.  The port (pretty much just a make file),
	and the distribution file.  The port file goes under /usr/ports,
	and the distribution file goes under /usr/ports/distfiles

	However!!!

	If you have an Internet connection and the *full* ports collection
	installed, it is *much* easier.

		cd /usr/ports/lang/perl5
		make install
		make clean

	This will fetch the distribution file for you, unpack it, build it,
	install it, etc, all in one "make install" shot.  Clean, simple,
	complete.  See pkg/PLIST in any port to see the packaging list of
	what files the port puts where.

: Must I run the port's make and configure? 

	make
	make install
	make clean

	And yes, you do.

: My lynx install was much easier.

	Perl and nearly anything else should be just as easy. -Always keep
	a *full* /usr/ports collection!  Personally, I think the system
	should refuse to install without the full ports collection.  Life
	is just so *incredibly* simple when you have it, and such complete
	and total hell when you don't...

: Also, should these un-tarred files always go in a
: particular file system (like /usr/local/packages)?

	Ports go in /usr/ports, but don't do that manually.  Use cvsup to
	update your ports.  Example scripts to do this are in
	/usr/share/examples/cvsup/

: There doesn't seem to be
: much documentation on packages themselves in the Handbook.

	man ports

	Also, install "pib", found in /usr/ports/sysutils/pib

	It's a great GUI ports browser/installer.
-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: Thu, 01 Oct 1998 00:03:44 GMT
From: pevets@yahoo.com (steve)
Subject: Premature end of script headers
Message-Id: <3612c610.44352204@news.uml.edu>

	Hey,
	I just started using perl and i got a logging script that
saves peopls info when they come to site.  however when i execute it
on my main page with <!--#exec cgi="/cgi-bin/log.pl" -->  is gives me
an error:
 Sep 30 19:51:54 1998] access to /cgi-bin/log.pl failed for
129.63.122.134, reason: Premature end of script headers

the script looks like this

#!/usr/local/bin/perl

$mainlog = "/data1/hypermart.net/tboy/log.htm";
$shortdate = `date +"%D %T %Z"`; 
chop ($shortdate);

open (MAINLOG, ">>$mainlog");
	print MAINLOG "At $shortdate,<b> $ENV{'REMOTE_ADDR'} </b> came
here using $ENV{'HTTP_USER_AGENT'} from <a
href='$ENV{'HTTP_REFERER'}'>$ENV{'HTTP_REFERER'}</a><p>";
close (MAINLOG);
exit;


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

Date: Thu, 01 Oct 1998 00:21:24 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Premature end of script headers
Message-Id: <Pine.GSO.4.02A.9809301720550.22957-100000@user2.teleport.com>

On Thu, 1 Oct 1998, steve wrote:

> Subject: Premature end of script headers

That's a message from your server. Please check the docs, FAQs, and
newsgroups about servers for more information. Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 01 Oct 1998 00:36:46 GMT
From: kenn@owl.co.uk
Subject: Seeking FTP over HTTP with Perl
Message-Id: <6uuiqu$rh6$1@nnrp1.dejanews.com>

Due to an office firewall and proxy, FTP clients don't work, but there is
virtually no restriction on HTTP traffic.

So, is there a script somewhere that will allow me set up a host outside the
firewall that will read files off my local machine and write them to this
remote host?

There's bits of code here and there that do bits & bobs of this sort of thing,
but a complete solution would be nice, one that presented an interface similar
to an FTP client. I'm not proficient enough in Perl yet to tackle this.

Thanks!

Ken

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


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

Date: 30 Sep 1998 16:59:40 -0700
From: larry@kiev.wall.org (Larry Wall)
Subject: Re: send geroge reese (was Re: Call for Participation: Python Conference)
Message-Id: <6uuglc$ji9@kiev.wall.org>

In article <360B9353.B05C95D5@min.net>, John Porter  <jdporter@min.net> wrote:
>Zenin wrote:
>Personally, I think we all -- and some of us more than others --
>could stand to take in an ML conference or two.

Well, I went to an XML conference.  Does that count?  :-)
 
Now if only XML would do type inferencing...
 
Larry
~



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

Date: Wed, 30 Sep 1998 23:01:32 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: soft reference to object?
Message-Id: <gLyQ1.5470$F7.20460630@news.itd.umich.edu>

In article <cohbtnx9ru6.fsf@omni.c-cube.com>,
Kin Cho  <kin@omni.c-cube.com> wrote:
>If I have a class BAR, what's syntax to soft reference BAR->new?

&{ can BAR "new" }("BAR", $other, @arguments);

There aren't any soft references involved, but it seems to be what you
want.

-- 
Sean McAfee | GS d->-- s+++: a26 C++ US+++$ P+++ L++ E- W+ N++ |
            | K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
            | tv+ b++ DI++ D+ G e++>++++ h- r y+>++**          | umich.edu


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

Date: 30 Sep 1998 22:36:53 GMT
From: richm@ucesucks.mulveyr.roc.servtech.com (Rich)
Subject: Re: Some kind of 'real' user interface?
Message-Id: <slrn715cjr.4t8.richm@ll.aa2ys.ampr.org>

On 29 Sep 98 11:30:20 GMT, David <david@nospam.port80.com> wrote:
>I'm trying to work out how I can add some kind of 'graphical
>interface' to my Perl programs running under NT. I don't mind
>using a DOS window interface (with limited menus, and graphics)
>but a Windows interface would be even better.
>
>Does anyone have any advice as to what modules to use for
>this kind of thing?
>

   Perl/Tk, of course.

- Rich

--
Rich Mulvey                                         
My return address is my last name, 
   followed by my first initial, @mulveyr.roc.servtech.com        
http://mulveyr.roc.servtech.com
Amateur Radio: aa2ys@wb2wxq.#wny.ny.usa


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

Date: 30 Sep 1998 14:39:15 -0700
From: hermit@cats.ucsc.edu (William R. Ward)
Subject: UNIVERSAL doesn't work how I'd expect
Message-Id: <waayar1wa9o.fsf@ese.UCSC.EDU>


I want to create a global filehandle that behaves the way STDOUT et al
do, in otherwords it is a global in all packages.  I though that
opening it as UNIVERSAL::NEWFH would do the trick, but it doesn't
work.  Is there another way?  Am I misunderstanding the meaning of
UNIVERSAL?

--Bill.

-- 
William R Ward          Bay View Consulting   http://www.bayview.com/~hermit/
hermit@bayview.com     1803 Mission St. #339        voicemail +1 408/479-4072
hermit@cats.ucsc.edu  Santa Cruz CA 95060 USA           pager +1 408/458-8862
 PGP Key 0x2BD331E5; Public key at http://www.bayview.com/~hermit/pubkey.txt
-----------------------------------------------------------------------------
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Ben Franklin, ~1784



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

Date: Wed, 30 Sep 1998 23:18:11 GMT
From: drschimpf@my-dejanews.com
Subject: Using the Perl 'format' to STDOUT
Message-Id: <6uue7i$luq$1@nnrp1.dejanews.com>

Using perl, version 5.003:

Trying to print 2 different reports to STDOUT with the FORMAT command.

I define format, loop through the pertinent data, write;

Define second format, loop through the pertinent data; write;

As soon as I defined the second format, the first report WILL NOT PRINT!.
I get the blanks and the 0 (from a @####.##).  If I comment out the second
format, it prints the first report OK.

Please help.

Tia,

dan

print
"----------------------------------------------------------------------------
--- -----------------------\n"; format = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
@<<<<<<<<<  @<<<<<<<  @<<<<<<<<< @<<<<<<<<<  @###.## $jobName,	$strtDate, 
$strtTime,  $endDate, $endTime,  $hrsRan .

# Get the first Top 20 List.
for ($i = 0; $i <= 19; $i++)
{
    $working_line = shift(@lines);
    $jobName      = substr($working_line, 0, 32);
    $strtYr       = substr($working_line, 32, 4);
    $strtMh       = substr($working_line, 36, 2);
    $strtDy       = substr($working_line, 38, 2);
    $strtHr       = substr($working_line, 40, 2);
    $strtMn       = substr($working_line, 42, 2);
    $strtSc       = substr($working_line, 44, 2);
    $endYr        = substr($working_line, 46, 4);
    $endMh        = substr($working_line, 50, 2);
    $endDy        = substr($working_line, 52, 2);
    $endHr        = substr($working_line, 54, 2);
    $endMn        = substr($working_line, 56, 2);
    $endSc        = substr($working_line, 58, 2);
    $hrsRan       = substr($working_line, 60, 5);

    # Doing some conversions to pretty it up.
    $strtDate     = $strtMh."/".$strtDy."/".$strtYr;
    $strtTime     = $strtHr.":".$strtMn.":".$strtSc;
    $endDate      = $endMh."/".$endDy."/".$endYr;
    $endTime      = $endHr.":".$endMn.":".$endSc;
    $hrsRan = ( $hrsRan / 100 );

    # Print out the report.
    write;
}

print "----------BEGIN SECOND LIST------------\n";

# Print Second Top 20 List header. print "  Total Avg. Run\n"; print " 
Length	# of Time\n"; print "  Job Name  (Hours)  Times Ran (Hours)\n"; print
"----------------------------------------------------------------------------
--- -----------------------\n"; format = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
@<<<<<<<<<  @##### @<<<<<<<<< $jName,  $runLength,  $timesRan, $avgHours .



-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Wed, 30 Sep 1998 04:12:52 GMT
From: mstark@primary.net (Mike Starkweather)
Subject: Win32, Net::Ping and alarm
Message-Id: <3611ae91.0@news.primary.net>

I am trying to write a Ping script using the CPAN Net::Ping module.
My Perl is ActiveState v5.00502 running on Windows95.  The following
message keeps coming up:

"The unsupported function alarm function is unimplemented at ..."

Taking this at face value, how can I get a working alarm function, or
is there a workaround with ActiveState?

Thanks...Mike Starkweather



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

Date: Thu, 01 Oct 1998 09:41:48 +0800
From: Justin Archie <thealienz@killkenny.com>
Subject: Word wrap for Perl
Message-Id: <3612DDDB.AA036A80@killkenny.com>

I am looking for just some function that will take a string that is
multiline. And I give it a delimeter of 72, the size of the string to
word wrapping. Can anyone help me?

Justin Archie



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

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

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