[7347] in Perl-Users-Digest
Perl-Users Digest, Issue: 972 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 3 23:07:20 1997
Date: Wed, 3 Sep 97 20: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, 3 Sep 1997 Volume: 8 Number: 972
Today's topics:
Re: Clearing screen in CGI <rootbeer@teleport.com>
Re: Complex map problem <rootbeer@teleport.com>
Re: Complex map problem <cphillip@kerr.phys.utas.edu.au>
Difficulties with \'s in recursive directory tree scrip <jaydee@worsdall.demon.co.uk>
Re: formatnames, filehandles and strict <mf@fishbone.ruhr.de>
Re: FTP with perl (Scott Houck)
Re: getuid and setuid (Chip Salzenberg)
Re: How to get keys of array? <dshoyt@worldnet.att.net>
Re: How to open a file for both read and write <rootbeer@teleport.com>
Re: Integers, God, and etc. <george_scott@nrel.gov>
Re: Making a Swiss-Army Knife HTML tool in Perl (Charlie Stross)
multidimensional arrays ? <basvreek@channels.nl>
Re: NET::NNTP Woes <bruceh@interaccess.com>
Re: pattern matching HELP! (Craig Berry)
Re: Perl (kind of) math question. (Scott Houck)
Perl for Win32 and Netscape, not working. (Mike Rambour)
Re: Perl Regular Expression has a bug? (Charles DeRykus)
Re: PERL/HTML Question <petri.backstrom@icl.fi>
Re: Positioning cursor on screen <rootbeer@teleport.com>
Send multi-part MIME with BLAT for NT ? <mbennett@ideaeng.com>
shell commands <dmoss@instinet.com>
Re: Time question.. (Scott Houck)
Re: Time warp - Perl 4 question <rootbeer@teleport.com>
Re: Web Form: Fields with Multiple values <rootbeer@teleport.com>
Re: Wrote new module, need help with system dependencie <zenin@best.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 3 Sep 1997 15:32:08 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: kchadha@hotmail.com
Subject: Re: Clearing screen in CGI
Message-Id: <Pine.GSO.3.96.970903152944.16111E-100000@julie.teleport.com>
On Wed, 3 Sep 1997 kchadha@hotmail.com wrote:
> How would I clear the screen from the GCI script
> after printing a couple of lines ?
If what you want is possible (and I'm not claiming it is) this is the Perl
code which you would need.
print 'some request to browser to make it clear the screen';
To find out what needs to go in the quote marks (and even whether this is
possible), check out the docs and FAQs about browsers and CGI. Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 3 Sep 1997 15:46:33 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Chris.Phillips@utas.edu.au
Subject: Re: Complex map problem
Message-Id: <Pine.GSO.3.96.970903153938.16111H-100000@julie.teleport.com>
On Wed, 3 Sep 1997, Chris Phillips wrote:
> Basically, I want the map function to skip a couple of the
> elements of the array in question. I cannot get it to work.
What do you mean by "skip"? Do you mean that it should return those
elements unchanged, or that it should not return those elements at all?
> # The following line is what I would like to use. It does not compile
> #testsub('*', map(@{$_} if ($_ ne 'b'), @a[0..2]), '*');
Maybe you want grep? (You could do this with map, but it's easier with
grep.)
testsub( '*', grep($_ ne 'b', @a[0..2]), '*' );
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 4 Sep 1997 10:31:36 +1000
From: Chris Phillips <cphillip@kerr.phys.utas.edu.au>
To: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Complex map problem
Message-Id: <Pine.GSO.3.94.970904102318.24459B-100000@kerr.phys.utas.edu.au>
Thanks Tom and Bennett,
(Maybe we need a newsgroup comp.lang.perl.answers.tom.phoenix!)
> On Wed, 3 Sep 1997, Chris Phillips wrote:
>
> > Basically, I want the map function to skip a couple of the
> > elements of the array in question. I cannot get it to work.
>
> Maybe you want grep? (You could do this with map, but it's easier with
> grep.)
>
I do need the power of map, but you are both right, grep is the way
to go. My final solution (untested) is:
maxmin(map(@ {$_}[$bchan..$echan], grep($_ ne 'blank',
@vel[0..$nspec-1])));
> Hope this helps!
It does indeed!
Cheers
Chris Phillips
-------------------------------------------------------------------
Department of Physics, Radio Astronomy Group, University of Tasmania
email: Chris.Phillips@utas.edu.au
Phone: (03) 62262405 (Work), (03) 62485285 (Telescope)
(03) 62278324 (Home), (03) 62262410 (Fax)
------------------------------
Date: Wed, 3 Sep 1997 23:55:14 +0100
From: Mark Worsdall <jaydee@worsdall.demon.co.uk>
Subject: Difficulties with \'s in recursive directory tree scripts
Message-Id: <Yowr6cASreD0EwwT@worsdall.demon.co.uk>
In article <5ue5ob$fca@news.nl.compuware.com>, Koos Pol <koos_pol@nl.com
puware.com.NO_JUNK_MAIL> writes
>I have this recursive script which runs several dir/file functions in a
>given directory tree
>
[snip]
Any chance of having a copy of this script? Please:-) to help me with my
recursive underpants problem! Mail direct to me though, don't want you
upsetting other underpants.
--
Mark Worsdall - Oh no, I've run out of underpants :(
Home:- jaydee@worsdall.demon.co.uk WEB site:- http://www.worsdall.demon.co.uk
Shadow:- webmaster@shadow.org.uk WEB site:- http://www.shadow.org.uk
------------------------------
Date: 3 Sep 1997 21:23:46 +0200
From: Martin Fischer <mf@fishbone.ruhr.de>
Subject: Re: formatnames, filehandles and strict
Message-Id: <5ukdg2$q96$1@fishbone.ruhr.de>
denis@mathi.uni-heidelberg.de wrote:
>how can i use formatnames and filehandles with strict...
>i got a errormessage:
>Bareword "PROBLEM" not allowed while "strict subs"
>for the formatfiles and
>Global symbol "OUT_FILE" requires explicit package name
>for the filehandles?
If you had posted some code, maybe somebody could help
you. Take a look at perldoc strict, there are examples.
ciao
Martin
--
Martin Fischer <mf@fishbone.ruhr.de> -------------------
<martinfi@geocities.com> | Comp Sci Student
PGP key: http://geocities.com/SiliconValley/Park/3082/ | FH-Bochum, Germany
Unsolicited commercial e-mail will be proof-read for $199/hr.
------------------------------
Date: Thu, 04 Sep 1997 02:08:22 GMT
From: scott@radix.net (Scott Houck)
Subject: Re: FTP with perl
Message-Id: <340f1805.9030955@news1.radix.net>
Tom Grydeland <tom@mitra.phys.uit.no> wrote:
>
>mweber@vt.edu (Matt Weber) wrote:
>> > Is there an easy perl script or module for FTPing something? It
>> > needs to be able to run on its own....log itslef in....transfer
>> > files and close the socket. The running on its own part will be
>> > done with crontabs. Any suggestions?
>
>scott@radix.net (Scott Houck) writes:
>> Maybe you should check out Expect.
>
>What on earth for? There's Net::FTP, you know. Works like a charm.
TMTOWTDI.
------------------------------
Date: 3 Sep 1997 23:21:15 GMT
From: chip@rio.atlantic.net (Chip Salzenberg)
Subject: Re: getuid and setuid
Message-Id: <5ukrdb$3e5$1@news1.atlantic.net>
According to wtang@cs.ualberta.ca (Wei Tang):
>I checked the online manual
> http://www.perl.com/CPAN-local/doc/manual/html/pod/perlfunc.html
>and it seems that there are no functions named "getuid" or "setuid".
Try perlvar, not perlfunc. You want $<, $>, $(, and $).
>If I want to call in a CGI script a Unix shell program which can only
>run under my own uid, what should I do?
You should read the perlsec man page.
--
Chip Salzenberg - a.k.a. - <chip@pobox.com>
(Roller coaster on camera:) "Wow, this square quarter mile
has unbelievably good light rail transit!" // MST3K
------------------------------
Date: Tue, 2 Sep 1997 23:31:46 -1000
From: "Dave Hoyt" <dshoyt@worldnet.att.net>
Subject: Re: How to get keys of array?
Message-Id: <5ul7ff$6ng@mtinsc05.worldnet.att.net>
Tracy,
Would you be opposed to using a hash for these? It seems like a unique
definable key almost screams hash table. If you are getting them from a
file for example:
while (<INFILE>) {
($key, $line) = /^(.*):(.*)$/;
$MyHash{$key}=$line;
}
Then say you wanted to print the "30 key" line or pass to a subroutine:
print $MyHash{30};
?!? Just a thought - Dave Hoyt
Tracy Vonick wrote in article
<01bcb7a7$748f48a0$b40101be@tvonick.paloma.palsec.com>...
>I have X numbers of lines of data & each line starts with a unique
>definable key. I can get the lines into arrays but can't print out the
>actual
>keys. Any help would be appreciated. (I am looking to call subroutines
>based on
>the key, 20,30,40 of each line)
>
>ex 20:This is test line #1
> 30: This is test line #2
> 40: This is test line #3
------------------------------
Date: Wed, 3 Sep 1997 16:21:20 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Songtao Chen <songtao@nortel.ca>
Subject: Re: How to open a file for both read and write
Message-Id: <Pine.GSO.3.96.970903162050.16111N-100000@julie.teleport.com>
On Wed, 3 Sep 1997, Songtao Chen wrote:
> Could anyone tell me how to open a file for both
> read and write ?
This is documented under 'open' in the perlfunc(1) manpage. Hope this
helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 03 Sep 1997 17:06:03 -0600
From: George Scott <george_scott@nrel.gov>
Subject: Re: Integers, God, and etc.
Message-Id: <340DED5B.42C1@nrel.gov>
> > Tom C. once wrote "God created the integers.
> >All else is the work of man"
A good quote, but not one of Tom's originals:
Tom was quoting the Prussian/German mathemetician
Leopold Kronecker (1823-1891).
--
------------------------------------------------------------------------------
George N. Scott EMAIL: george_scott@nrel.gov
Wind Resource Assessment Group VOICE: 303-384-6903
National Renewable Energy Laboratory 1617 Cole Blvd., Golden, CO
80401-3393
------------------------------
Date: Thu, 4 Sep 1997 00:16:28 +0100
From: charlie@nospam.antipope.mapson.org (Charlie Stross)
Subject: Re: Making a Swiss-Army Knife HTML tool in Perl
Message-Id: <slrn60rruc.ld.charlie@SPAMBLOCKED>
T. Wheeler<twheeler@m-net.arbornet.org> wrote
(in article <340c8683.676630895@news.stlnet.com>):
>
>I am wanting to deelop a do-it-all perl tool that will take plain text
>files and create decent formatted HTML. Once it is completed, I will
>post it in th epublic domain for all to use.
First, go look at the following places:
http://www.metahtml.com/
http://www.engelschall.com/sw/wml/
http://www.mincom.com/mtr/sdf/
Next, go to your local CPAN mirror and look at ePerl.
Then do some _serious_ thinking about web architecture. (There are a few
essays on the subject sitting around on my website -- see
http://www.antipope.org/charlie/webbook/ -- including tools that do some
of the things you want, like scan for broken links or recursively build
HTML files into a target tree from a source tree. But that's by no means
the full story).
Warning: the subject is as broad as it's deep, and it's about as deep
as the Marianas Trench.
-- Charlie
"Many computer scientists have fallen into the trap of trying to define
languages like George Orwell's Newspeak, in which it is impossible to
think bad thoughts. What they end up doing is killing the creativity
of programming." -- Larry Wall
>> To reply: remove NOSPAM and anagrams, or see http://www.antipope.org/ <<
------------------------------
Date: Thu, 04 Sep 1997 01:33:14 +0200
From: Bas van Reek <basvreek@channels.nl>
Subject: multidimensional arrays ?
Message-Id: <340DF3BA.2C78@channels.nl>
Is there a way to create multidimensional
arrays in perl. (something like a(10,10) in
a lot of other languages)
could noy find any docs about it ?
Bas van Reek
------------------------------
Date: Wed, 03 Sep 1997 16:55:13 -0500
From: Bruce Hodo <bruceh@interaccess.com>
Subject: Re: NET::NNTP Woes
Message-Id: <340DCEB0.F98A9705@interaccess.com>
Graham Barr wrote:
> The problem you have is with the constructor. Iy you test the result
> from
>
> $nntp = Net::NNTP->new(Debug);
>
> You will see that it is undefined. (That is unless you have a machine
> with the name 'Debug')
>
> I also do not understand why you set the environment variable
> before calling the constructor. The first argument to the constructor
> is the hostname to connect to.
>
> It seems that you also want to turn on debugging, so the line
> you need is
>
> $nntp = Net::NNTP->new("news.ilk.com", Debug => 1);
>
> Regards,
> Graham.
>
I also received a response from Bryan Blackburn with the same information. I
made the suggested changes i.e. the constructor and the $nntp. But I get the
same error! It still doesn't like my constructor.
Here are the relevant lines:
use Net::NNTP;
$nntp = Net::NNTP->new("news.ilk.com",Debug => 1);
$nntp->post( $posting );
> Bruce Hodo initially wrote:
> >
> > I've been trying to use NET::NNTP.pm in perl, but I get the following
> > error:
> >
> > Can't call method "Net::NNTP::post" without a package or object
> > reference at /export/home/getaway/site/cgi-bin/postnews.cgi line 97,
> > <BODY> chunk 15.
> >
> > Line 97 is:
> > $nntp->Net::NNTP::post($posting);
> >
> > I've tried it with just "post($posting);", but it still doesn't work. In
> > the beginning of my script, I have the following:
> >
> > use Net::NNTP; # This is how the server I'm using set it up.
> > $ENV{'NNTPSERVER'}="news.ilk.com";
> > $nntp = Net::NNTP->new(Debug);
> >
> > I figure I'm doing something stupid, but I can't figure out what! The
> > documentation for NET::NNTP is ... well, "thin".
> >
> > Any help would be appreciated.
>
> --
> The road to success is lined with many tempting parking spaces.
--
Bruce Hodo - Webmaster, GetAwayNetwork, Inc.
==Providing vacation information services on the World Wide Web==
For Villas, Resorts, Hotels, Air/Hotel Packages, Charter Airfares
=============== Visit us at http://getawaynet.com ===============
------------------------------
Date: 4 Sep 1997 00:19:02 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: pattern matching HELP!
Message-Id: <5ukupm$es9$1@marina.cinenet.net>
Eric Bohlman (ebohlman@netcom.com) wrote:
: Gary Colman (SPAMFREEcolmang@ms.com) wrote:
: : > I am trying to check for illegal characters in a string.
: : > the allowable set is [a-z0-9_&.-] and I am trying to write code
: : > But no matter what I do I can't seem to find the right syntax.
:
: : print "Allowable chars: A-Z a-z 0-9 & . - _\n";
: : chop($bob=<STDIN>);
: : die "foo'ed\n" unless ($bob =~ /^[a-z0-9_&\.-]*$/);
:
: Nope. That pattern will match *any* string (start of string, followed by
: *zero or more* characters in the class, followed by end of string).
Not true. It won't match e.g. "!". There we have start of string,
followd by a character *not* in the class, followed by end of string. The
pattern leaves room for only allowed chars (0 or more of them) between the
two string anchors, and thus works.
: Changing the * to a + won't help; the resulting pattern will match any
: string that begins with one of the allowed characters, even if it contains
: illegal characters as well.
Again, not true, for the same reason.
: What you need is a complemented character class and a reversed sense of
: match:
:
: die "foo'ed\n" if ($bob =~ /[^a-z0-9_&\.-]/);
:
: or
:
: die "foo'ed\n" unless ($bob !~ /[^a-z0-9_&\.-]/);
These work, and are probably more efficient, as my other post on this
thread suggested.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Thu, 04 Sep 1997 01:47:05 GMT
From: scott@radix.net (Scott Houck)
Subject: Re: Perl (kind of) math question.
Message-Id: <340e12a1.7650240@news1.radix.net>
Andrew Johnson <ajohnson@gpu.srv.ualberta.ca> wrote:
>Scott Houck wrote:
>>
>> gbacon@adtran.com (Greg Bacon) wrote:
>>
>> >as hex or hexadecimal is another way of saying base sixteen. Most
>> >humans are used to dealing with either base ten or base six.
>>
>> Who are these humans that are used to dealing with base six? Are they
>> mutants that ran out of fingers? :-)
>
>indeed, I've heard of base twenty (vigesimal) with the Mayans, and
>base sixty (sexagesimal) with the Babylonians (still in use into
>the 15th century, at least in astronomy)---but a base six system
>doesn't ring any bells...
Greg was referring to seconds and minutes. He considers this to be a
"cross-breed" between base 10 and 6. I consider it to be base 60.
But I guess it's six of one and a half score of the other. :-)
------------------------------
Date: Thu, 04 Sep 1997 00:13:16 GMT
From: me@no-spam.com (Mike Rambour)
Subject: Perl for Win32 and Netscape, not working.
Message-Id: <5ukuee$a37@daffy.sb.west.net>
Help, I have just installed Netscape Gold V3.03 and now when I try
to run a perl prog that works fine in Explorer and used to work in
Netscape V2.01, I get an error trying to run a application x-perl.
This is the same machine where it works with explorer and Netscape
2.01, CGI from the web work just fine, its only ones from
http://localhost/cgi-bin/xxx.pl that give that error. I am running
NT4 and I can't seem to find out what I need to do to make the new
version of Netscape work.
thanks for any help
mike
p.s. I did a uninstall and reinstall of V2.01 and it now also fails
but Explorer still works.
mikey at inline-tech dot com
(replace at with @ and replace dot with . to reply)
And for you automated email spammers out there, here's the email addresses
of the current board of the Federal Communications Commission:
Chairman Reed Hundt: rhundt@fcc.gov
Commissioner James Quello: jquello@fcc.gov
Commissioner Susan Ness: sness@fcc.gov
Commissioner Rachelle Chong: rchong@fcc.gov
And let's help you send some spam to the USPS, too:
customer@email.usps.gov
------------------------------
Date: Wed, 3 Sep 1997 23:34:48 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: Perl Regular Expression has a bug?
Message-Id: <EFyHI1.D5E@bcstec.ca.boeing.com>
In article <5tup1n$cnd$1@news.ncu.edu.tw>, <dennis@csie.nctu.edu.tw> wrote:
> See my program:
> #!/usr/bin/perl
> $date = localtime();
> print "$date\n";
> if($date = ~/(..):(..):(..)/)
> {
> print "Now \$date = $date\n";
> print "Time: $1:$2:$3\n";
> }
>
> And the output is very strange, Why?
> Tue Aug 26 22:32:25 1997
> Now $date = 4294967295
> Time: ::
if ($date = ~ /(..):(..):(..)/)
^
^
no space here
Eliminate the extraneous space between = and ~.
Otherwise, perl pattern matches $_ with /(..):(..):(..)/ which
fails yielding a 0 and then applies the unary ~ (i.e., bitwise
negation or ones complement) to 0.
So, you're doing this: $date = ~0 which equals 4294967295.
Check perlop or pg. 80 in the blue camel.
HTH,
--
Charles DeRykus
ced@carios2.ca.boeing.com
------------------------------
Date: Mon, 01 Sep 1997 09:33:25 +0300
From: Petri Backstrom <petri.backstrom@icl.fi>
Subject: Re: PERL/HTML Question
Message-Id: <340A61B5.28C3@icl.fi>
Rameet Kohli wrote:
>
> How do I pass arguements from a hyperlink to a perl script?
Do just as you would to any other CGI script (written in
any language):
<a href="http://host.domain/cgi-bin/myscript.cgi?p1=v1&p2=v2">
Myscript</a>
Then you do
use CGI;
my $query = CGI->new;
my $v1 = $query->param('p1');
my $v2 = $query->param('p2');
in order to retrieve the values.
regards,
...petri.backstrom@icl.fi
ICL Data Oy
Finland
------------------------------
Date: Wed, 3 Sep 1997 15:53:03 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Robert Moorhead <robwm@worldnet.att.net>
Subject: Re: Positioning cursor on screen
Message-Id: <Pine.GSO.3.96.970903154908.16111I-100000@julie.teleport.com>
On Wed, 3 Sep 1997, Robert Moorhead wrote:
> I am writing a perl 5.003 script which I would like to reposition the
> cursor to overwrite the previous line printed on the screen.
Sounds as if you want the Curses module, which you can find on CPAN.
http://www.perl.com/CPAN/
> I would like to input one character such as a menu selection
> without requiring the user to press the 'enter' key. Is this a
> possibility?
http://www.perl.com/CPAN/doc/FAQs/FAQ/html/perlfaq5/
How_can_I_read_a_single_characte.html
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 03 Sep 1997 18:17:17 -0700
From: "Mark L. Bennett" <mbennett@ideaeng.com>
Subject: Send multi-part MIME with BLAT for NT ?
Message-Id: <340E0C1D.6708@ideaeng.com>
I generate outbound email from Perl by calling the command
line utility BLAT on Windows NT. Much of the Perl/smtp stuff
I found on the net was quite Unix-centric, but this utility
works really well on NT.
Blat works great if I'm sending plain old ASCII files.
And it has a switch for encoding 8 bit files.
However, I'd also like to send HTML attachments.
I can totally prepare the ASCII file that contains
the multipart MIME headers and text for the attachement(s).
However, Blat doesn't output the correct Mime header.
It's "-mime" flag seems to want to encode the entire
file as escaped charater sequences.
Is there any way to send multi-part messages with BLAT?
( Basically, I want to have it look similar to if you email
an HTML page from Netscape.
In that case you get a small blurb, then multiple attachments.
That's what I'm trying to emulate. )
One way would be for BLAT to output the following
headers:
Content-Type: multipart/mixed; boundary="------------3B77249D2FD6"
This is a multi-part message in MIME format.
--------------3B77249D2FD6
Then I could take over from here.
Another way would be if BLAT would simply not output a
blank line after it's last header field.
I could easily add these headers to my file.
But, once Blat sends it's X-Mailer: header line it outputs
a blank line (as it normally should). After that point,
any header fields in my file are considered plain old
data.
Suggestions?
Mark
------------------------------
Date: Wed, 03 Sep 1997 18:33:42 -0400
From: David Mossakowski <dmoss@instinet.com>
Subject: shell commands
Message-Id: <340DE5C6.FC728EC0@instinet.com>
Hi,
I need to create a form on intranet for people to be able to change
their UNIX passwords. Question is: even if I log in the script as a
super user can I execute something like: system "yppasswd user_name";
? I mean it then asks for the password and then again to retype it.
Is there a way to type remotely? If not how else can I do this?
Please don't ask why don't we just tell the people to go to UNIX machine
and change the password there.
dave.
--
David Mossakowski
Instinet Corporation
212-310-7275
dmoss@instinet.com
"I don't sit idly by, I'm planning a big surprise" FUGAZI
------------------------------
Date: Thu, 04 Sep 1997 02:25:21 GMT
From: scott@radix.net (Scott Houck)
Subject: Re: Time question..
Message-Id: <34101a2e.9583690@news1.radix.net>
CrAzY <guitarplayer@hotmail.com> wrote:
> $ampm = "AM";
> $ampm = "PM" if ($hour > 11);
> $hour = $hour - 12 if ($hour > 12);
> $hour = 12 if ($hour == 0);
> $current_time = "$hour:$min $ampm";
For manual formatting, after determining AM/PM, I like to use the
following convenient formula to convert the hours from 24-hour to
12-hour format:
$hour = ($hour + 11) % 12 + 1;
This maps 0->12, 1->1, 2->2, ..., 12->12, 13->1, etc. No fuss, no
muss! :-)
------------------------------
Date: Wed, 3 Sep 1997 16:16:31 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: George Menyhert <menyhert@acm.org>
Subject: Re: Time warp - Perl 4 question
Message-Id: <Pine.GSO.3.96.970903161056.16111M-100000@julie.teleport.com>
On Wed, 3 Sep 1997, George Menyhert wrote:
> I wrote a script using Perl 5.003. It works great. However, it is very
> complex and long (4500 lines). The problem is that I have to move it
> back to Perl 4 to guarantee the widest range of acceptance.
If you want the greatest number of people to be able to use it, you should
re-code it in C. (That's why Perl itself is written in C, after all.) But
there are more important things than how amazingly portable a script is.
One important feature is a script's reliability, and 5.004 is much more
reliable than any earlier version of Perl.
Tell your reluctant clients that your code comes in two parts: One part is
written in Perl, and the other part is the perl binary, written in C. "And
it comes with hundreds of pages of documentation at no extra charge!"
That'll sell them! :-)
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 3 Sep 1997 16:22:02 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Webwest design <webwest@webwestdesign.com>
Subject: Re: Web Form: Fields with Multiple values
Message-Id: <Pine.GSO.3.96.970903162131.16111O-100000@julie.teleport.com>
On Wed, 3 Sep 1997, Webwest design wrote:
> If I have a field with multiple values (ie a SELECT field)
> it only picks up the last inputed value from the SELECT field
> and overwrites all previous versions.
>
> How do I get the other values???
Use CGI.pm, whose docs explain how to make this work. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 4 Sep 1997 00:10:38 GMT
From: Zenin <zenin@best.com>
Subject: Re: Wrote new module, need help with system dependencies.
Message-Id: <5uku9u$igl$1@nntp2.ba.best.com>
Todd Beverly <beverly@kodak.com> wrote:
> The files will always be written on a
> MS Windows machine, which means, on a UNIX machine, a 'reverse' of the
> string before unpacking a float.
What about Intel Unix systems like FreeBSD, Solaris x86, Linux, etc?
Wouldn't they be the same as Windows floats?
> I would like to install this package on NT and Unix machines, which
> means that I need to differentiate operating systems in order to
> properly determine floats.
> My first thought was to add an entry to
> Makefile.PL to determine the OS type during the make and modify the
> reading routine code with a conditional, sort of like C's #ifdef.
I'd recommend taking a look at the Configure script for perl itself.
It includes a byte order test of some kind that I'm sure you could
convert into perl or C without much problem. Trying to figure out
and keep track of the byte order of all the different systems would
just be a pain.
--
-Zenin
zenin@best.com
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 972
*************************************