[16392] in Perl-Users-Digest
Perl-Users Digest, Issue: 3804 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 26 00:05:24 2000
Date: Tue, 25 Jul 2000 21:05:10 -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: <964584309-v9-i3804@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 25 Jul 2000 Volume: 9 Number: 3804
Today's topics:
Re: - I Need Help (David H. Adler)
Re: Any free Perl-Friendly hosts? (David Efflandt)
backtick with spaces on win32 mikelot@my-deja.com
Re: backtick with spaces on win32 jdallega@my-deja.com
Re: backtick with spaces on win32 <waltman@netaxs.com>
Re: CGI and CSS, How in Apache ??? (David Efflandt)
Re: CGI->new(*FORM) Problem... (David Efflandt)
Re: cookie and redirect trouble... (Keith Calvert Ivey)
exactly WHEN will PP-3rd be in bookstores, etc? Anyone (David Combs)
Re: exactly WHEN will PP-3rd be in bookstores, etc? An (Abigail)
Re: exactly WHEN will PP-3rd be in bookstores, etc? An <care227@attglobal.net>
Formatting text file <bobby.j.allen@intel.com>
Re: How do you find the full name of the user in NT? <s24673@sp.edu.sg>
Multiple Return Streams from CGI process <dpmarvin@teleport.com>
Outputing CSV?? <rand_mcneely@yahoo.com>
Re: Perl Power Tools Project Asleep? <elaine@chaos.wustl.edu>
Re: Perl's BigFloat/BigInt <rwan@cs.mu.OZ.AU>
Re: Perl's BigFloat/BigInt <rwan@cs.mu.OZ.AU>
Re: Reading and updating a file <billy@arnis-bsl.com>
return value of `eval "use lib"' (Sweth Chandramouli)
text output file <sarah@warp2k.com>
Username Passwd in Perl <dfarrell@informix.com>
Re: Username Passwd in Perl (Abigail)
Re: Was Why won't "use strict;" work? <whataman@home.com>
What is a simple code to code a directory? <dotel@nf.sympatico.ca>
Re: What is a simple code to code a directory? (Abigail)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 26 Jul 2000 04:01:53 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: - I Need Help
Message-Id: <slrn8nsolh.q12.dha@panix6.panix.com>
On Thu, 20 Jul 2000 05:36:26 GMT, Bob Kling <bbkling@earthlink.net> wrote:
>I need to hire a Programmer - WORK AT HOME -Full Time
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently
to "news.announce.newusers", you might have already known this. :)
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
There is a Perl Jobs Announce list that may be more helpful to you. See
<http://www.pm.org/mailing_lists.shtml> for details.
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"Well, sure, being a ruthless godless dictator is fun, but it's all
about the fans!"
- Public Broadcast of His Imperial Majesty, Dimension 431-q-fhd
------------------------------
Date: Wed, 26 Jul 2000 02:13:34 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Any free Perl-Friendly hosts?
Message-Id: <slrn8nsi93.eb1.efflandt@efflandt.xnet.com>
On Mon, 24 Jul 2000, Matthew Keene
<matthew.keeneNOmaSPAM@colesmyer.com.au.invalid> wrote:
>Try http://free.prohosting.com. Unfortunately they've recently
>started forcing banners onto pages, but what do you want for
>nothing ?
I have found www.virtualave.net to be more reliable, they allow you to
have a subdomain or your own domain, and they do e-mail (free.prohosting
has sendmail disabled). You have a choice of putting the banner on
your page if you don't want a popup.
Both run CGI as you anywhere. Neither has telnet access (I get around
that with a webshell.cgi). To find which Perl modules are on each, go to
one of 2 URL's at end of my sig, link to my scripts, and look for
findpmod.cgi. Note: module names are case sensitive.
--
David Efflandt efflandt@xnet.com http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/ http://cgi-help.virtualave.net/
------------------------------
Date: Wed, 26 Jul 2000 01:24:32 GMT
From: mikelot@my-deja.com
Subject: backtick with spaces on win32
Message-Id: <8llekd$jka$1@nnrp1.deja.com>
How do you use the backtick operator in Win32 if there are embedded
spaces in the path to the program? I tried a couple of ways, neither of
which worked, shown below...
----------
$TST='c:\Program Files\Adobe\Reader\Acrord32.exe';
$TST1='c:\\Program\ Files\\Adobe\\Reader\\Acrord32.exe';
@l=`$TST`;
@l=`$TST1`;
----------
06:20pm-~/scripts>perl tst_backtick.pl
'c:\Program' is not recognized as an internal or external command,
operable program or batch file.
'c:\Program\' is not recognized as an internal or external command,
operable program or batch file.
06:20pm-~/scripts>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 26 Jul 2000 01:46:26 GMT
From: jdallega@my-deja.com
Subject: Re: backtick with spaces on win32
Message-Id: <8llfth$kf8$1@nnrp1.deja.com>
Did this ever work? \ never worked for me in win - try this:-
$TST="C:/Program Files/Adobe/Reader/Acrord32.exe";
cheers
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 25 Jul 2000 22:53:01 -0400
From: Walt Mankowski <waltman@netaxs.com>
Subject: Re: backtick with spaces on win32
Message-Id: <m34s5dwqk2.fsf@netaxs.com>
mikelot@my-deja.com writes:
> How do you use the backtick operator in Win32 if there are embedded
> spaces in the path to the program? I tried a couple of ways, neither of
> which worked, shown below...
>
> ----------
> $TST='c:\Program Files\Adobe\Reader\Acrord32.exe';
> $TST1='c:\\Program\ Files\\Adobe\\Reader\\Acrord32.exe';
> @l=`$TST`;
> @l=`$TST1`;
>
> ----------
> 06:20pm-~/scripts>perl tst_backtick.pl
> 'c:\Program' is not recognized as an internal or external command,
> operable program or batch file.
> 'c:\Program\' is not recognized as an internal or external command,
> operable program or batch file.
> 06:20pm-~/scripts>
For backwards compatibility with old DOS programs, NT gives every file
with more than 8 characters another filename that does have 8 chars.
There's an option on dir (sorry, I forget which one) that will show
them to you.
"Program Files" is probably "PROGRA~1". so you could try to run
$TST='c:\PROGRA~1\Adobe\Reader\Acrord32.exe';
------------------------------
Date: Wed, 26 Jul 2000 02:38:30 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: CGI and CSS, How in Apache ???
Message-Id: <slrn8nsjns.eb1.efflandt@efflandt.xnet.com>
On Tue, 25 Jul 2000 15:35:08 GMT, John van V <john@thinman.com> wrote:
>I got really excited when I got at least a few cgi features working.
>
>But apache appears to be looking for the CSS file in the cgi directory,
>where of course it cant be seen by the UA(netscape).
>
>I tried to put it in the html directory but it didn't get it there
>either.
What does this have to do with Perl? It sounds like you are specifying an
incorrect full or relative URL path to your CSS file.
--
David Efflandt efflandt@xnet.com http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/ http://cgi-help.virtualave.net/
------------------------------
Date: Wed, 26 Jul 2000 02:33:56 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: CGI->new(*FORM) Problem...
Message-Id: <slrn8nsjf8.eb1.efflandt@efflandt.xnet.com>
On Tue, 25 Jul 2000 18:54:40 -0400, Phil Zampino <zampino@squidco.com> wrote:
>(apologies if this comes through more than once, my news server is
>apparently misbehaving...)
>
>I'm trying to write better Perl by switching a routine I have handled
>manually to Perl/CGI.
>
>The routine stores off the current form passed to a CGI program then
>calls an authorization routine, which eventually re-calls the original
>CGI program. When the program is re-called it looks for the presence of
>the stored form file, and if it exists and the user is now authorized it
>reloads the form data.
>
>This has worked well for me manually storing and loading the form data,
>but I decided that the CGI code $query->save(*FH) would work more
>efficiently (and in general I much prefer the CGI method of handling
>parameters) so I changed the code to perform the CGI save call (see
>below). I've found a lot of examples of how to store off the data, and
>I can see that my /tmp/$lockfile contains the passed form data after the
>save and both before and after the authorization call.
>
>The problem is that on returning to the CGI program, my restore doesn't
>seem to bring back the form data, but instead some kind of HASH value- I
>can't figure out how to properly read it back in using Perl/CGI
>techniques. I've tried 23 permutations of loading the data back in
>(FORMS, *FORMS, \*FORMS) and I've looked at umpteen sites on the web on
>how to do this. While I've seen specific techniques for pulling back
>the form data and manually parsing the stored data, I've seen no generic
>method for restoring the stored data back into a CGI form available to
>my program.
>
>Can anyone tell me what I'm doing wrong, or what the trick is to
>restoring this data?
>
>Thanks,
> philz
>
>
>
> if (!(-e "/tmp/$lockfile")) {
> open(FH,">/tmp/$lockfile") or die "can't write to forms log: $!";
> flock(FH,2) or die "can't flock formlog: $!";
> $query = CGI->new();
> $query->save(*FH);
> close(FH) or die "can't close formlog: $!";
> }
>
> ($user_id, $last_visit) = &auth_check(1);
>
> open(FORMS, "< /tmp/$lockfile") or die "can't read forms log: $!";
> flock(FORMS, 2) or die "can't lock forms log: $!";
>
> $query = new CGI(\*FORMS);
> print "the query is now $query";
Not quite, try:
$q = new CGI(FORMS);
print "Query Variables",$q->p;
foreach ($q->param) { print "$_ = ",$q->param($_),$q->br; }
># I would think the above would restore the form data but instead I get
># some sort of hash value in $query
Yes, because you are printing the pointer to the location of the data.
> system "rm /tmp/$lockfile";
> return ($user_id, $last_visit);
--
David Efflandt efflandt@xnet.com http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/ http://cgi-help.virtualave.net/
------------------------------
Date: Wed, 26 Jul 2000 02:43:29 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: cookie and redirect trouble...
Message-Id: <397e4fb0.5035356@news.newsguy.com>
Rodney Engdahl <red_orc@my-deja.com> wrote:
> "Anders Hansson" <hansson.anders@goteborg.utfors.se> wrote:
>
>> # ------------------------------------------ Perl
>> print "Location: $fullurl\n";
>> print "Set-Cookie: CountVal=1; path=/; expires=$expdate;\n";
>> print "\n";
>>
[snip]
>If what you want to do is:
>
>1. Set Cookie, and then
>
>2. redirect.
>
>why have you written the code to:
>
>1. redirect, and then
>
>2. Set Cookie.
>
>??
Those two header lines are part of a single transaction, so the
code isn't really doing it in two steps at all. Not that this
has anything to do with Perl.
--
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC
------------------------------
Date: 26 Jul 2000 01:45:32 GMT
From: dkcombs@netcom.com (David Combs)
Subject: exactly WHEN will PP-3rd be in bookstores, etc? Anyone know?
Message-Id: <8llfrs$tkg$1@slb7.atl.mindspring.net>
I saw something from Larry that the book was going to
be ready for TPC -- but that's over by now (true?) --
and O'Reilly's site is still saying "July".
I wasn't at TPC -- *were* copies available there?
(I guess they're going to print a zillion copies -- lets
hope not too many errata, what with the huge rush (and immenses
effort expended) to get it ready.)
David
------------------------------
Date: 25 Jul 2000 22:31:00 EDT
From: abigail@foad.org (Abigail)
Subject: Re: exactly WHEN will PP-3rd be in bookstores, etc? Anyone know?
Message-Id: <slrn8nsjau.vcg.abigail@alexandra.foad.org>
David Combs (dkcombs@netcom.com) wrote on MMDXXI September MCMXCIII in
<URL:news:8llfrs$tkg$1@slb7.atl.mindspring.net>:
~~ I saw something from Larry that the book was going to
~~ be ready for TPC -- but that's over by now (true?) --
~~ and O'Reilly's site is still saying "July".
I got my courtesy copy on Monday.
~~ (I guess they're going to print a zillion copies -- lets
~~ hope not too many errata, what with the huge rush (and immenses
~~ effort expended) to get it ready.)
There's one thing already on the errata list.
Abigail
--
$_ = "\112\165\163\1648\141\156\157\164\150\145\1628\120\145"
. "\162\1548\110\141\143\153\145\162\0128\177" and &japh;
sub japh {print "@_" and return if pop; split /\d/ and &japh}
------------------------------
Date: Tue, 25 Jul 2000 22:30:09 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: exactly WHEN will PP-3rd be in bookstores, etc? Anyone know?
Message-Id: <397E4D31.E39E7890@attglobal.net>
Abigail wrote:
>
> David Combs (dkcombs@netcom.com) wrote on MMDXXI September MCMXCIII in
> <URL:news:8llfrs$tkg$1@slb7.atl.mindspring.net>:
> ~~ I saw something from Larry that the book was going to
> ~~ be ready for TPC -- but that's over by now (true?) --
> ~~ and O'Reilly's site is still saying "July".
>
> I got my courtesy copy on Monday.
*grumble* I _paid_ for the darn thing and I still don't have it!
------------------------------
Date: Tue, 25 Jul 2000 17:57:27 -0700
From: "Bobby J. Allen II" <bobby.j.allen@intel.com>
Subject: Formatting text file
Message-Id: <8lldct$nao@news.or.intel.com>
I need to reformat a text file so I can read it in Excel ( simple tab
delimited text file ). The file I have in the beginning is composed of data
from several runs of a program. Each run of the program spits out about 30
lines of data, then about 3 news lines. Then , the next run is appended to
the end of this file, and so on. By the end , my file looks like this:
Run #1
a
b
c
.............
Run #2
a
b
c
.............
I have to sort and format the file so that the final text file looks like
this:
Run1 Run2 Run3
a1 a2 a3
b1 b2 b3
c1 c2 c3
I'd appreciate any suggestions. Thanks.
------------------------------
Date: Wed, 26 Jul 2000 09:46:23 +0800
From: "s24673" <s24673@sp.edu.sg>
Subject: Re: How do you find the full name of the user in NT?
Message-Id: <397e42f0.0@scctn03.sp.edu.sg>
Thanks for all the answers. I was trying to use this in Perl. However, the
function Win32::Usergetattributes does not return the full name. Is there an
alternative I can use?
Clay Calvert <ccalvert@WanGuru.com> wrote in message
news:o91insot8kc2qu4khrlfcbsvnefr90p6t9@4ax.com...
> On Fri, 21 Jul 2000 07:41:04 GMT, f.wegener.nospam@bornundpartner.com
> (Frank Wegener) wrote:
>
> >On Fri, 21 Jul 2000 07:24:41 GMT, wschulz@nospam_matrix42.de (Walter
> >Schulz) wrote:
> >
> >>>You can find out the "full name" of the user in UNIX using NIS. Is
there an
> >>>equivalent in Win NT?
> >>
> >>Server only Included in the Windows NT Server, but not
> >>Workstation, Resource Kit.
> >
> >Sorry, but if I type "net user <username>" on a command-prompt, I get
> >to see all of this, too. Admittedly, I type it on a BDC, but the "net"
> >command should be identical for a WS.
> >
> >Frank
>
> "net user <username> /domain" works, but only for the domain that you
> are logged into. I guess that is what you call a feature. : )
>
> Clay Calvert
> Replace the "W" in my e-mail address with an "L" to reply.
------------------------------
Date: Tue, 25 Jul 2000 18:24:35 -0700
From: Dave Marvin <dpmarvin@teleport.com>
Subject: Multiple Return Streams from CGI process
Message-Id: <397E3DD3.6B467560@teleport.com>
(I'm posting to both comp.lang.perl.misc and comp.lang.perl.modules.
Somebody please holler if this is poor form.)
I invoke a CGI process to process a database query and present the
resulting product, as a zip file, for user download. So far, so good.
Then I need the same script to write HTML back to the calling program to
announce the completion of the process. Not good. It appears that
whatever method of output I first initiate from perl is used throughout
the perl process. So, if the first output is a "print
'content-disposition: attachment...'" statement, my subsequent call to
my CGI object, '$query->header;$query->start_html', gets "buried" in the
output stream of the file download. Conversely, if I call the HTML code
first, and terminate it with '$query->end_html', my subsequent
invocation of "print 'content-disposition: attachment...'" gets routed
back to my web page, and the user never receives the dialog box to
initiate their data file download.
All the script components work swell, individually. It's only when I
try to string together what I want to be two discrete output products
(binary file as either streaming-octet or x-zip, and text/html) that I
get what I can describe only as "pipe overlap". I've got $|++ at the
top of the process to disable buffering. (Otherwise, I've got REAL
troubles!) I've got both output routines running through 'system'
calls that I think should both serialize my processes and "encapsulate"
the output streams. I tried defining multiple CGI objects, and running
the separate output through each object. I tried using FileHandle and
separate handles for each process. I tried nph (as a pragmata, with
push) and as a method in $query->header(-nph). I tried
$query->header(-target=>'frame_name'). All four different processes
gave me four different results (the last one actually delivered the HTML
to the target frame, but it was preceded by the cached(?) zip file
product, and so the HTTP header was never parsed and decoded by my
browser), but none actually gave me a clean boundary between output
streams.
Is there more than no way (this IS perl!) to direct "chunks" of output
to different locations using CGI?
------------------------------
Date: Tue, 25 Jul 2000 22:22:32 -0500
From: "Rand" <rand_mcneely@yahoo.com>
Subject: Outputing CSV??
Message-Id: <snsm9v4p3j160@corp.supernews.com>
I've got a script which will execute a user defined query and output it as
HTML or CSV.
Everything works great except when they chose CSV, the browser suggests the
file name script_name.cgi requiring the users to change it to somthing.csv.
Any ideas how to fix this?
Please e-mail me at rand_mcneely@yahoo.com if you have any suggestions.
------------------------------
Date: Wed, 26 Jul 2000 03:46:07 GMT
From: Elaine Ashton <elaine@chaos.wustl.edu>
Subject: Re: Perl Power Tools Project Asleep?
Message-Id: <B5A3D745.6C4B%elaine@chaos.wustl.edu>
in article 397d9c6b@cs.colorado.edu, Tom Christiansen at tchrist@perl.com
quoth:
> I need to get this on CPAN, but it's not clear where suites go.
> I guess just in my author directory.
My first thought would be to add it to the CPAN scripts section, but they
aren't really 'scripts' either. Suites could also be viewed as bundles
though I'm not sure if one wants to glob them together. I don't see why they
couldn't go in your directory. Also, someone could get the ppt list going
again on perl.org.
e.
------------------------------
Date: Wed, 26 Jul 2000 11:27:24 +1000
From: Raymond WAN <rwan@cs.mu.OZ.AU>
Subject: Re: Perl's BigFloat/BigInt
Message-Id: <Pine.LNX.3.96.1000726112433.18166B-100000@vile.cs.mu.OZ.AU>
On Tue, 25 Jul 2000, Bart Lateur wrote:
> > $d = ($a1 / 1000) * ($a2 / 1000);
> > it doesn't seem to work so I've created $b and $c in hopes that
> >the BigFloat division will be used. Does anyone know why this is so?
> >Also, does anyone know how to perform an "explicit cast" in Perl so that I
> >can be sure it is working?
> Are $a1 and $a2 simple scalars, or of class BigFloat? It should be the
> latter.
Ooooohhhhh, they're simple scalars... So how do I make it into a
class of BigFloat?
And if I have $z = $x * $y, if $x is of class BigFloat and $y is a
scalar, will $z become a BigFloat too or do I have to force it into a
BigFloat too? Should $y be also a BigFloat even if it's a small number
[i.e., 1000]?
Thank you!
Raymond Wan
------------------------------
Date: Wed, 26 Jul 2000 11:33:33 +1000
From: Raymond WAN <rwan@cs.mu.OZ.AU>
Subject: Re: Perl's BigFloat/BigInt
Message-Id: <Pine.LNX.3.96.1000726112754.18166C-100000@vile.cs.mu.OZ.AU>
On 25 Jul 2000, Steffen Beyer wrote:
> Have you considered using some "big int" math only instead?
> If your largest value is a few billion, and the smallest is
> something like 10E-10, just multiply all numbers with 10E+10,
> add some tens of digits to the size of your (now integer)
> numbers, and perform your calculations, and in the end shift
> the decimal point back to where it belongs. Would that be
> feasible for your problem?
Hi! Ummm, feasible....but I'm not sure if it'll help. In the
end, I need to output a bunch of numbers which could be large floating
point numbers. While you do have a point...I can do the intermediate
calculations as BigInts but the outputted numbers must be large floating
point numbers. So I would just be delaying the problem a bit.
And my problem is with using either of the BigFloats and BigInts.
I just don't know how Perl uses them automatically just by having a "use
Math::<whatever>" at the beginning of my program. Compared to C, seems
like "magic". :)
> Could simplify some of the
> problems and worries you mentioned, me thinks.
> Just my $0.02...
Your $0.02 is welcomed :). Thanks a lot!
Raymond Wan
------------------------------
Date: Wed, 26 Jul 2000 01:41:05 GMT
From: Ilja Tabachnik <billy@arnis-bsl.com>
Subject: Re: Reading and updating a file
Message-Id: <8llfji$kbl$1@nnrp1.deja.com>
In article <8lkvac$85q$1@nnrp1.deja.com>,
hayati@math.berkeley.edu wrote:
> In article <397DF530.25286258@arnis-bsl.com>,
> Ilja Tabachnik <billy@arnis-bsl.com> wrote:
> > hayati@math.berkeley.edu wrote:
> > >
> > > 1. Suppose I have a file not consisting of formatted records. I
> read
> > > it into an array, manipulate the array, then want to write the
> contents
> > > back to the file. I can't close the file in between reading and
> > > writing, because I want to keep a lock on it. So I seek back to
the
> > > beginning of the file, write the contents of the array, then
> truncate
> > > the file to the appropriate length. My question is: is there a way
> to
> > > get this appropriate length without first writing the contents of
> the
> > > array to a temp file?
> > >
> >
> > IMHO, you may just truncate the file to zero-length and write to
file
> > *after* truncating it.
>
> Right, of course. However, I am generally pretty nervous about
deleting
> before writing (the file in question is my incoming mail folder), and
> what puzzled me was Abigail's "file updating sequence" in article
> slrn8nnif0.vcg.abigail@alexandra.foad.org:
>
> >> The proper sequence is:
> >>
> >> - Open a file for read/write.
> >> - Lock the file.
> >> - Read the content.
> >> - Seek to beginning.
> >> - Write new content.
> >> - Truncate file.
> >> - Close file (which releases the lock).
>
The sequence is OK, but if you are _really_
'pretty nervous about deleting before writing'
then try following:
- open the file for read/write
- lock the file
- *create a backup* and close the backup file
- do whatever you want with original file
- close (implicitly unlocks)
- delete backup later (after 1 hour/day/month ...)
If you are still nervous:
- create multiply backups (on different filesystems?)
Ilja.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 26 Jul 2000 03:39:27 GMT
From: sweth+perl@gwu.edu (Sweth Chandramouli)
Subject: return value of `eval "use lib"'
Message-Id: <P3tf5.13404$eS6.234300@news1.rdc1.md.home.com>
I've got a script that has a user-configurable parameter
@INC_DIRS that describes the location of directories in which to look for
modules specific to this script; after doing some checks to make sure that
the modules in the specified directories meet certain criteria, I want to
add the contents of @INC_DIRS to @INC, and then invoke the relevant modules
via "use" statements. I'm doing the @INC change with the following line:
eval "use lib qw(@INC_DIRS)";
, and everything works fine--except when I try to make sure
that the eval succeeded. I normally wouldn't check the exit status of
a command like that, but I was having some problems with the equivalent
eval+use that I was doing subsequently to invoke the modules in @INC_DIRS,
so I did something along the lines of
eval "use lib qw(@INC_DIRS)" or
die "Couldn't use libs in \@INC_DIRS!";
, which would die every time. Some more testing solved the
original problem, which turned out to not be with this eval at all; some
subsequent tests revealed that I was being misled by this die into thinking
that the eval here was failing, even though it was succeeding.
I've pored over the O'Reilly books, grepped the perl docs,
and searched the web until my eyes hurt, and I can't find anything that
can explain this behaviour, which I see under perl 5.005_03 on Solaris.
Can someone explain why this would return false even though it succeeded?
TIA,
Sweth.
--
Sweth Chandramouli ; <sweth@sweth.net>
<a href="http://www.sweth.net/legal/disc.html">*</a>
------------------------------
Date: Wed, 26 Jul 2000 03:19:12 GMT
From: "Sarah" <sarah@warp2k.com>
Subject: text output file
Message-Id: <QMsf5.15326$qs5.63087@typhoon.midsouth.rr.com>
Hello:
I need to be able to save the top ten scores in a game. I have already
created the code in FLASH that will read from a text file and insert the
proper info if a new top ten score is made. The information is sorted in
Flash and is ready for output to a TEXT.TXT file.
What I need help with is with a CGI program and info so that I can output
the following example text to a plain text file OVERIDING the previous text
if its there.
score1=10000&name1=Steve Jones&email1=steve@server.com
&score2=9000&name2=Sarah&email2=sarah@server.com
&score3=8000&name3=Mike Jones&email3=mike@server.com
&score4=7000&name4=Sue Smith&email4=sue@server.com
&score5=6000&name5=Harry James&email5=harry@server.com
&score6=5000&name6=Sarah Chism&email6=sarah@server.com
&score7=4000&name7=Mike Jones&email7=mike@server.com
&score8=3000&name8=Sue Smith&email8=sue@server.com
&score9=2000&name9=Harry James&email9=harry@server.com
&score10=1000&name10=Harry James&email10=harry@server.com
Please help if you know of a CGI / PERL program that is suited for this and
quik sample code for the output. Any other help is appreciated.
Thanks,
Sarah
sarah@warp2k.com
------------------------------
Date: Tue, 25 Jul 2000 20:10:43 -0600
From: "Daniel M. Farrell" <dfarrell@informix.com>
Subject: Username Passwd in Perl
Message-Id: <397E48A2.21AEBB16@informix.com>
Hey ..
Is there any form of password management in Perl ?
--
I want to encrypt a passwd given to me from an
html form. (The form will supply a username and
unencrypted passwd).
At other times I will receive the encrypted passwd
in a perl script and want to validate it.
Thanks in advance ..
Me
------------------------------
Date: 25 Jul 2000 23:51:57 EDT
From: abigail@foad.org (Abigail)
Subject: Re: Username Passwd in Perl
Message-Id: <slrn8nso2n.vcg.abigail@alexandra.foad.org>
Daniel M. Farrell (dfarrell@informix.com) wrote on MMDXXI September
MCMXCIII in <URL:news:397E48A2.21AEBB16@informix.com>:
//
// Hey ..
//
// Is there any form of password management in Perl ?
//
// --
//
// I want to encrypt a passwd given to me from an
// html form. (The form will supply a username and
// unencrypted passwd).
//
// At other times I will receive the encrypted passwd
// in a perl script and want to validate it.
Well, given that you get the encrypted password, the "eq" operator will
do for validation, won't it?
Abigail
--
map{${+chr}=chr}map{$_=>$_^ord$"}$=+$]..3*$=/2;
print "$J$u$s$t $a$n$o$t$h$e$r $P$e$r$l $H$a$c$k$e$r\n";
------------------------------
Date: Wed, 26 Jul 2000 02:38:35 GMT
From: "What A Man !" <whataman@home.com>
Subject: Re: Was Why won't "use strict;" work?
Message-Id: <397E4F60.90E797CE@home.com>
Sorry, I'm not sure what you mean, but I did notice that my mime setting
was on quoted-printable and I didn't realize it. Sorry, I changed the
format settings in NS Composer, and hope this one goes thru as plain text.
--Dennis
Larry Rosler wrote:
> In article <slrn8ns964.vcg.abigail@alexandra.foad.org> on 25 Jul 2000
> 19:37:46 EDT, Abigail <abigail@foad.org> says...
> > What A Man ! (whataman@home.com) wrote on MMDXX September MCMXCIII in
> > <URL:news:397E21AB.B70EEFC8@home.com>:
> > :} <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> >
> > What follows isn't HTML, but you should post HTML or pseudo-HTML on
> > Usenet in the first place.
>
> s/(should)/$1n't/;
>
> > Get some real tools on your computer.
>
> Amen!
>
> --
> (Just Another Larry) Rosler
> Hewlett-Packard Laboratories
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com
------------------------------
Date: Wed, 26 Jul 2000 02:51:17 GMT
From: "Kevin" <dotel@nf.sympatico.ca>
Subject: What is a simple code to code a directory?
Message-Id: <397e51f0.0@209.128.1.3>
I can not find an easy cut and paste perl code to copy the contents of a
directory to another directory.
Please help!
Kevin
whatasite@geocities.com
------------------------------
Date: 25 Jul 2000 23:55:06 EDT
From: abigail@foad.org (Abigail)
Subject: Re: What is a simple code to code a directory?
Message-Id: <slrn8nso8k.vcg.abigail@alexandra.foad.org>
Kevin (dotel@nf.sympatico.ca) wrote on MMDXXI September MCMXCIII in
<URL:news:397e51f0.0@209.128.1.3>:
:} I can not find an easy cut and paste perl code to copy the contents of a
:} directory to another directory.
Perhaps because you don't need Perl for that. Use the toolkit.
But if you insist on a cut and pastable Perl program:
perl -e 'system "cd directory; tar cf - . | (cd another; tar xf -)"'
Abigail
--
$; # A lone dollar?
=$"; # Pod?
$; # The return of the lone dollar?
{Just=>another=>Perl=>Hacker=>} # Bare block?
=$/; # More pod?
print%; # No right operand for %?
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 3804
**************************************