[8350] in Perl-Users-Digest
Perl-Users Digest, Issue: 1967 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 24 21:07:54 1998
Date: Tue, 24 Feb 98 18:00:26 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 24 Feb 1998 Volume: 8 Number: 1967
Today's topics:
CGI/WWW Programming In Perl Tutorial - Boulder, CO <johnd@xor.com>
form update and search <sssmith@ucar.edu>
gnuplot; secret slashes <stvhoof@netvision.net.il>
Re: HELP array stuff (Martien Verbruggen)
Re: HELP array stuff <ludlow@us.ibm.com>
Re: help with matching strings (Martien Verbruggen)
Re: Help: Warning in string to number conversion. <rjk@coos.dartmouth.edu>
Re: How can i add users to the passwd file in unix with (Martien Verbruggen)
indirect object syntax <stvhoof@netvision.net.il>
Re: indirect object syntax (Gabor)
Re: Memory allocation and garbage collection (Ilya Zakharevich)
Re: Overwriting a entry in a file. (Martien Verbruggen)
Re: Philisophical Response? Perl5/oop (Earl Hood)
Re: Please Help: File search with wildcarded filenames <cdkaiser@delete.these.four.words.concentric.net>
Re: reg expression help.. <cdkaiser@delete.these.four.words.concentric.net>
Re: Safely running one-liners (Martien Verbruggen)
Re: The Ineffable Tom C. <brobbins@tis.com>
Re: ts: double vs single quotes <bland@warped.nirvana.net>
Re: Update another frame from Perl script. (Sean Smithers)
Re: Why PERL? [Re: Beginner in trouble] <camerond@mail.uca.edu>
Re: Why PERL? [Re: Beginner in trouble] (Nathan V. Patwardhan)
win32 file handling. Deleting and Overwriting a file. <vallery@bvsd.k12.co.us>
Re: Year 2000 Compliance: Lawyers, Liars, and Perl (Brian Roach)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 24 Feb 1998 16:36:53 -0700
From: John Donnelly <johnd@xor.com>
Subject: CGI/WWW Programming In Perl Tutorial - Boulder, CO
Message-Id: <34F35995.1A0E@xor.com>
There are two seats remaining (max class size is 10) in the upcoming
CGI/WWW tutorial at our training facility in Boulder, CO. For details:
John Donnelly, Training Coordinator
XOR Network Engineering, Inc.
http://www.xor.com/training; johnd@xor.com; 303-448-4816
*****
CGI and WWW Programming in Perl
(Two Day Hands-on Lecture/Lab)
Tom Christiansen, Perl Consultantancy
Thursday-Friday, March 5-6, 1998
Tuition: $595
Learn about CGI and other WWW programming using Perl. Spe-
cial attention is given to system security issues. All
aspects of writing and processing fill-out forms are covered
using the standard CGI.pm module. Some attention is also
given to parsing of HTML documents and writing "spiderbots",
automata that navigate the Web on their own.
------------------------------
Date: Tue, 24 Feb 1998 15:53:15 -0700
From: Edward Smith <sssmith@ucar.edu>
Subject: form update and search
Message-Id: <34F34F5B.52E1@ucar.edu>
I need to create a cgi script(or java program) that updates a file on my
disk. But I want to only allow access to the site if they have filled
out the form. I know access can do stuff like this but I want to do it
on a unix machine/server.
I've found a lot of programs that will simply add whatever is put in the
form to a file(kind of a database). But I haven't found anything that
can check against a file or have both options.
Is this even possible in cgi/java/javascript or is there a program on
the web that will do this on a unix machine
any ideas are appreciated
Thank you
Ed Smith
sssmith@ucar.edu
------------------------------
Date: Wed, 25 Feb 1998 01:11:51 +0200
From: Tzadik Vanderhoof <stvhoof@netvision.net.il>
Subject: gnuplot; secret slashes
Message-Id: <34F353B7.30B4@netvision.net.il>
Dale Wityshyn wrote:
> print "Content-type: image/gif\r\n";
> print "\r\n";
>
> binmode( STDOUT );
>
> open(GP,"|\\gnuplot\\gnuplot.exe");
> print GP "set terminal gif\n";
> print GP "plot x**3\n";
> close GP;
Perhaps you really want
binmode(GP);
after your "open"...it doesn't seem like you use STDOUT at all after
the "binmode" call.
A small off-topic aside... I noticed you use the \\ notation for DOS
filenames... it's a well-kept secret that you can use the
Unix-style / for filenames on DOS or Windows...i.e.
open F, "/foo/bar/baz.txt";
will work on DOS or Windows. This makes the code look neater and has
the added advantage of easier porting to Unix should that become
necessary. This feature actually has nothing to do with Perl...it's
supported at the DOS Service level and can be used in any language.
------------------------------
Date: 24 Feb 1998 23:08:24 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: HELP array stuff
Message-Id: <6cvjt8$mgc$2@comdyn.comdyn.com.au>
In article <34F339F4.41C6@giss.nasa.gov>,
Douglas Cordero <dcordero@giss.nasa.gov> writes:
> foreach $A1 (@array1) {
> $found = 0;
> foreach (@prodata) {
Is this @prodata or @array2? You called it @array2 before.
> if (m/$A/) {
You mean $A1 here?
Both the -w flag and the strict pragma would have prevented these.
> Any ideas where I am screwing this rather easy task up?
Six pieces of advice:
Use the -w flag
Use the -w flag
Use the -w flag
Use the -w flag
Use the -w flag
use strict
I wish the -w flag was on by default.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | For heaven's sake, don't TRY to be
Commercial Dynamics Pty. Ltd. | cynical. It's perfectly easy to be
NSW, Australia | cynical.
------------------------------
Date: Tue, 24 Feb 1998 17:16:12 -0600
From: James Ludlow <ludlow@us.ibm.com>
Subject: Re: HELP array stuff
Message-Id: <34F354BC.78F7@us.ibm.com>
Douglas Cordero wrote:
[snip]
> foreach $A1 (@array1) {
^^^
> $found = 0;
> foreach (@prodata) {
> if (m/$A/) {
^^^
[snip]
I think I see what you're trying to do. It's possible that what I
pointed out above is a typo. You have "A1" in one place and "A" in the
other. I'll bet that using -w might have caught that by giving you a
warning that the variable was only used once. (Unless, of course, it's
used somewhere else that isn't shown.) Anyway, the moral is: Always,
always, always use -w.
--
James Ludlow (ludlow@us.ibm.com)
This isn't tech support, and all opinions are my own.
------------------------------
Date: 24 Feb 1998 22:59:05 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: help with matching strings
Message-Id: <6cvjbp$mgc$1@comdyn.comdyn.com.au>
In article <6cucmk$80g$1@m1.cs.man.ac.uk>,
chiut5@cs.man.ac.uk (Tony Chiu) writes:
> Here is my code which is quite vague as I don't know the syntax properly:
Ok, what is the question? What is it doing, or not doing?
'help with matching strings'? 'Is my code ok'? I'll run over it a bit..
> #!/usr/common/bin/perl
# Use the -w flag
use strict;
> open(OUT, ">match") || die;
# The $! variable will tell you WHY it went wrong
open(OUT, ">match") || die "cannot open match for write: $!";
> &in_author;
>
> sub in_author {
> open(STAFF, "staff.txt") || die "Cannot open staff.txt";
open(STAFF, "staff.txt") || die "Cannot open staff.txt for read: $!";
> @staff=(<STAFF>);
> open(AUTHOR, "author.html") || die "Cannot open author.html";
# ditto
> foreach $staffname (@staff)
> {
> while (<AUTHOR>)
> {
> if (/$staffname/)
> {print (grep(/$staffname/))};
What si this grep supposed to be doing here? What exactly do you want?
The line that contains $staffname?
> }
> }
> }
>
# You're not closing the files.
This loop will not do what you think it does. It will run through the
file author.html once, and on successive loops it will just never
enter the while(<AUTHOR>) loop.
Maybe do something like:
open(INF, "staff.txt") || die "Cannot open staff.txt for read: $!";
@staff = <INF>;
close(INF);
open(INF, "author.html") || die "Cannot open author.html for read: $!";
@html = <INF>;
close(INF);
# Get rid of the newlines
chomp(@staff);
chomp(@html);
foreach $staff (@staff)
{
@match = grep(/$staff/, @html);
print "Matches for $staff:\n";
foreach $line (@match)
{
print "\t$line\n";
}
}
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd. | you come to the end; then stop.
NSW, Australia |
------------------------------
Date: Tue, 24 Feb 1998 20:24:27 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: Help: Warning in string to number conversion.
Message-Id: <34F372CC.2CCDD874@coos.dartmouth.edu>
uri@sysarch.com wrote:
>
> Chipmunk <rjk@coos.dartmouth.edu> writes:
>
> > [one of several attempts to match strings numerically equivalent to 1]
> > (/^\s*\+?0*(?:(.0*)?1e(\d+)|1(?:\.0*(?:\D|$)|[^\d.]|$))/
> > and ((not defined $2) or (length($1) == $2)))
>
> why not use this (randal schwartz invented it a long time ago) which
> will match any legal number. then just compare to 1. you can handle
> white space by trimming the string or adding \s* to this regex.
>
> /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/
You're trying to spoil my fun, aren't you?
I'm actually trying to match all strings which are numerically equivalent to
1, including strings like ' 1foo'. So I could use Randal's regex like this:
/^\s*([+-]?(?=\d|\.\d)\d*(?:\.\d*)?(?:[Ee][+-]?\d+)?)/ and $1 == 1;
All that hard work for nothing. Oh well. :-)
--
_ / ' _ / rjk@coos.dartmouth.edu
( /)//)//)(//)/( chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
It's funny 'cause it's true ... and vice versa.
------------------------------
Date: 24 Feb 1998 22:25:15 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: How can i add users to the passwd file in unix with Perl?
Message-Id: <6cvhcb$m4h$1@comdyn.comdyn.com.au>
In article <34f2fed7.955694595@news.io.com>,
slocum@io.NOSPAM.com (Brett Slocum) writes:
> On 23 Feb 1998 00:30:37 GMT, mgjv@comdyn.com.au (Martien Verbruggen)
> wrote:
>
>>In article <eK$cKh#P9GA.267@upnetnews03>,
>> "Hagen" <insel@msn.com> writes:
>>> How can i add users to the passwd file in unix?
>>
>>Open up the file in your favourite editor, and add a line. Or, use one
>>of your system specific admin tools. Or go and ask on a unix group.
>>This has nothing to do with perl.
>
> Actually, if you read the Subject header, he wants to know how to do
> this in Perl.
Ok, here's a longer and more complete answer, showing why it has
nothing to do with perl.
Open the file for reading, get all the information, add the line that
you want to add to that information, and write out the file. Make sure
you do the proper locking and unlocking, other processes might be
trying to write to it as well. Oh, dang, how do I make sure those
other processes know that I am doing something to the file? I'll have
to use the system specific calls to the passwd functions. Oh, wait...
doesn't perl have my system specific calls to update password entries?
bummer. What about shadow passwords? yp? NIS?
See what I mean?
If it is just a simple file, and you can be absolutely certain that no
other process will write to it while you are, or every other process
that writes to it uses a file locking that you can use as well, then
you can open the file, lock it, do with it what you want, write it and
close it. Just like any other file operation task that is described in
the documentation for open, close, perlop, various perlfaqs,
specifically section 5, and about 10 times a week on this newsgroup.
There are just way too many ifs in that sentence. Use the tools that
come with your OS. That way the chances that you screw up are small.
if you have to ask how to modify a passwd entry or 'file', you
shouldn't be modifying it.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | If it isn't broken, it doesn't have
Commercial Dynamics Pty. Ltd. | enough features yet.
NSW, Australia |
------------------------------
Date: Wed, 25 Feb 1998 01:16:19 +0200
From: Tzadik Vanderhoof <stvhoof@netvision.net.il>
Subject: indirect object syntax
Message-Id: <34F354C3.54BF@netvision.net.il>
My question seems to have disappeared from the ng, so I'm posting it
again....sorry if you see it twice...
I am using CGI.pm. I have a line that says
$foo = $cgi->param('bar');
It works fine. Just as an experiment to increase my understanding of
using objects in Perl, I tried changing it to:
$foo = param $cgi 'bar';
This caused a syntax error. Why is this? Aren't "object-oriented" and
"direct object" syntax supposed to do the same thing?
Thanks,
Tzadik
------------------------------
Date: 25 Feb 1998 00:39:38 GMT
From: gabor@vmunix.com (Gabor)
Subject: Re: indirect object syntax
Message-Id: <slrn6f6qc3.5cc.gabor@vnode.vmunix.com>
In comp.lang.perl.misc, Tzadik Vanderhoof <stvhoof@netvision.net.il> wrote :
# My question seems to have disappeared from the ng, so I'm posting it
# again....sorry if you see it twice...
#
# I am using CGI.pm. I have a line that says
#
# $foo = $cgi->param('bar');
#
# It works fine. Just as an experiment to increase my understanding of
# using objects in Perl, I tried changing it to:
#
# $foo = param $cgi 'bar';
$foo = CGI::param $cgi 'bar';
------------------------------
Date: 24 Feb 1998 23:32:01 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Memory allocation and garbage collection
Message-Id: <6cvl9h$p9p$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to
<geobo@els.liu.se>],
who wrote in article <6cvic3$hpf$1@nnrp1.dejanews.com>:
> Hi,
>
> I have a problem understanding the way perl handles memory. Perlfaq3 says:
>
> However, judicious use of my() on your variables will help make sure
> that they go out of scope so that Perl can free up their storage for
> use in other parts of your program.
>
> If I run the program below, I thought that the space allocated for $tmp would
> be reused in each subX.
>
> #!/usr/local/bin/perl -w
>
> my $ps_command = "ps -l | grep $$ | grep -v grep | grep -v sh";
> my $big = 'X' x 5000000;
>
> sub1(); print `$ps_command`;
> sub2(); print `$ps_command`;
> sub3(); print `$ps_command`;
> sub4(); print `$ps_command`;
> sub5(); print `$ps_command`;
>
> sub sub1 {my $tmp = $big;}
> sub sub2 {my $tmp = $big;}
> sub sub3 {my $tmp = $big;}
> sub sub4 {my $tmp = $big;}
> sub sub5 {my $tmp = $big;}
$tmp is undef()ed, but the storage it takes is not deallocated - in
the hope that when you call sub3 next time, one will not need to
allocate it again (it is considered especially useful for the cases
when $tmp grows during the call to sub3, the above hack is avoiding
repeated reallocations).
Perl is very greedy, whatever it takes, it tries to keep it in a hope
to speed up things later. I myself do not believe in these hacks, I
thingk that nowadays they slow things down instead of speeding them up.
Ilya
------------------------------
Date: 24 Feb 1998 22:36:48 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Overwriting a entry in a file.
Message-Id: <6cvi20$m4h$2@comdyn.comdyn.com.au>
In article <6ct725$nld$1@ha2.rdc1.sfba.home.com>,
dmmartin@home.net (Michael Martin) writes:
> open(FILE, ">>file.ext"); #open the file with read/write access
- That's not read/write access, it's opening for append.
- You're not checking the return value of open(), which you should
always do, especially if your code is an example.
- Even if you opened the file for read/write, it still wouldn't work,
because you're not writing to it.
If you want to 'change lines' in a 'text' file, read the perl FAQ,
section 5:
perldoc perlfaq5
/How do I change one line in a file
Martien
PS. The original poster seemed to be confused between appending and
changing contents of a file. Maybe a repost with a bit more clear
description of the problem might help?
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | I'm desperately trying to figure out
Commercial Dynamics Pty. Ltd. | why kamikaze pilots wore helmets - Dave
NSW, Australia | Edison
------------------------------
Date: 24 Feb 1998 22:25:52 GMT
From: ehood@medusa.acs.uci.edu (Earl Hood)
Subject: Re: Philisophical Response? Perl5/oop
Message-Id: <6cvhdg$n1b@news.service.uci.edu>
In article <autopen-2202981053190001@dynamic58.pm07.mv.best.com>,
Laurel Shimer <autopen@autopen.com> wrote:
>When we talk he always says 'you are going to need to write this (new
>code) in Perl 5'. It seems to me that since I invoke the Perl5 interpreter
>and use functions that are new to Perl 5 (chomp, newer version of
>subroutine calls, etc.) that I am 'writing in Perl 5'. He, of course,
>feels that to write in Perl 5 is to write object oriented only.
He needs to be reducated. It appears to be commom to confuse OO
programming with OO programming *languages*. Example, I can do OO
programming in C, but C is not an OO programming language. Also, I can
be doing functional programming in C++, and C++ is considered an OO
programming language.
Regardless of programming methodology you are using, if you are writing
programs in langauge X, you can claim you are doing X programming.
However, you cannot state (for all cases) that doing X programming, you
are automatically programming in the methodology the language was
designed for. Example: Just because you have written a C++ program,
does not automatically imply you know OO programming. It is amazing
the number of people who automatically make the association. A C++
programmer can be an idiot when it comes to OO programming, and an OO
programmer can be an idiot when it comes to C++.
BTW, as an OO programming language, Perl is has its deficiencies.
Problems have been cited in other discussion threads.
>I'm not saying that object oriented is not a good thing. Since I haven't
>oriented myself that way yet, I don't think I can either champion it or
>look down my nose at it. And it seems that it is safer and easier to
>champion it whether or not that is a valid point of view!
OO has great uses, but it is not the end-all, be-all on how to do
things.
>I'm curious about the communities attitudes towards object oriented Perl
>and also the concept that Perl 5 implies object oriented code.
See above. My general coding style is a mixture of both. So my
code is sure to drive an OO-purists nuts, but he/she cannot claim that
I am not "programming in Perl 5".
--ewh
--
Earl Hood | University of California: Irvine
ehood@medusa.acs.uci.edu | Electronic Loiterer
http://www.oac.uci.edu/indiv/ehood/ | Dabbler of SGML/WWW/Perl/MIME
------------------------------
Date: 25 Feb 1998 01:06:45 GMT
From: Cameron Kaiser <cdkaiser@delete.these.four.words.concentric.net>
Subject: Re: Please Help: File search with wildcarded filenames
Message-Id: <6cvqr5$o6b@examiner.concentric.net>
fihserman1234@hotmail.com (Jay Yang) writes:
>$name = 'abc.*';
>@files = $name;
It won't work. You're assigning the *literal string* 'abc.*' to @files.
>and it didn't work. I also tried 'glob' function but it may not be
>supported in the UNIX system (Unix system V Release 4) I'm using.
I can't see why not.
>However, it works on my Linux system by modifying as follows:
>@files = glob ($name);
You might also try
@files = <$name>;
If you really are stuck, you could do something like:
opendir(D, ".");
@files = readdir(D);
closedir(D);
and then filter @files according to your rules. But I can't imagine why
glob() would not work on SVR4 unless you have something really, really funky.
--
Cameron Kaiser
cdkaiser at concentric dot net (it hasn't helped the spam yet though)
*** visit the Spectre Server at www.sserv.com
*** C64 software lives! www.computerworkshops.home.ml.org
------------------------------
Date: 25 Feb 1998 01:12:17 GMT
From: Cameron Kaiser <cdkaiser@delete.these.four.words.concentric.net>
Subject: Re: reg expression help..
Message-Id: <6cvr5h$p96@examiner.concentric.net>
alex@gossamer-threads.com (Alex Krohn) writes:
>my ($regexp) = "word";
>$regexp = "\Q$regexp\E" if (!$in{'re'});
>$regexp = "\b$regexp\b" if ($in{'ww'});
>$regexp = "(?i)$regexp" if ($in{'cs'});
>and then in the for loop:
>$expr = $regexp;
>$expr = s/word/$term/;
I'm confused: Where is $term coming from? Don't you mean, '$expr =~ s/...' ?
Why not put $term in place of "word" back when you defined $regexp?
>eval { $match = ($values[$field] =~ /$expr/) };
>Does that make sense? Does putting an eval in there every time make
>things worse then before?
If eval is being looped around, yes. eval in a loop degrades runtime because
the block has to be recompiled each time. You should put the loop in the
eval instead.
I'm assuming you're using the eval because you don't trust the pattern not
to break your script, but you don't need the eval to interpolate the $expr.
If you can trust that $expr will always be a legitimate regexp, then drop
the eval entirely.
--
Cameron Kaiser
cdkaiser at concentric dot net (it hasn't helped the spam yet though)
*** visit the Spectre Server at www.sserv.com
*** C64 software lives! www.computerworkshops.home.ml.org
------------------------------
Date: 24 Feb 1998 22:45:06 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Safely running one-liners
Message-Id: <6cvihi$m4h$3@comdyn.comdyn.com.au>
In article <6ctlft$3st$1@lennon.postino.com>,
danny@lennon.postino.com (Danny Aldham) writes:
> A lot of posters here have .sigs that include perl one liners.
> Is there a safe way to run them, and be assured that they wont
> damage and/or erase files? (or e-mail off my shadow file)
A good rule of thumb would be: Don't run it if you don't understand
what it will do. Often reformatting the one-liners and getting rid of
some of the obscure variable names will help you in that.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | In the fight between you and the world,
Commercial Dynamics Pty. Ltd. | back the world - Franz Kafka
NSW, Australia |
------------------------------
Date: Tue, 24 Feb 1998 12:16:54 -0500
From: Bert Robbins <brobbins@tis.com>
To: Brendan Knox <knoxb@pecc.co.uk>
Subject: Re: The Ineffable Tom C.
Message-Id: <34F30086.4A1@tis.com>
Brendan Knox wrote:
>
> Maybe we should form comp.lang.perl.newbies. Your opinion will change
> when you see such newbies ask the same question week after week. Why
> should any of us have to refrain from being sarcastic to people that
> haven't
> tried to find out themselves? Furthermore, if anyone is hurt to the
> point
> of dismissing Perl and/or this newgroup to sarcasm, then you really have
> to
> wonder what type of person they are. Perhaps if they can't take the
> heat,
> they too should get out of the kitchen.
What an arrogant attitude. If I express a interest in something
I don't expect the old timers to laugh in my face and say well
if you can't figure out how we got here then you obviosly aren't
smart enough for us to talk to.
The Perl community is best servered by being friendly and
courteous to newcomers. We need to advocate Perl as the
solution to problems that Perl is best suited to accomplish.
We need to take a leadership role in ensuring that Perl is
understood and used to the benefit of all.
> That said, I understand your opinion, but I don't agree with it. Most
> of the
> newbies in any newsgroup have never taken the time to bother looking at
> any
> form of documentation be it manpages, online web pages, textfiles or
> books.
> If they have tried, I'd be quite amazed, as most of this stuff is easy
> to find
> and easy to understand. If it isn't... well that's a whole other rant
> about
> people being allowed to access programming languages and interpreted
> scripting
> tools. :>
>
Just think about youself in similar situations where you found
something that interested you and how you expanded your
knowledge in that area. If in an endeavor like this you were
handed a pile of paper and told to read it and figure it out
yourself then I feel that you were treated grossly. And, if
you decided to drop your interest in that area then you were
recipient of the same treatment you are subjecting others to.
Take someone under your wing and offer to be a mentor to them.
You will be suprised how much you will learn from them about
the subject area because of their fresh view.
Thanks
Bert Robbins
------------------------------
Date: 24 Feb 1998 15:19:38 -0500
From: bland <bland@warped.nirvana.net>
Subject: Re: ts: double vs single quotes
Message-Id: <lbbtvwu55x.fsf@warped.nirvana.net>
tsatan@hotmail.com writes:
> As a C programmer I am in the habit of using only double-quoted strings in
> perl. Such strings are subject to variable interpolation and backslash
> interpretation. Is there enough of a performance penalty here that I should
> consider using single-quoted strings by default?
I would highly doubt it, but you should benchmark to be sure.
------------------------------
Date: Wed, 25 Feb 1998 01:08:48 GMT
From: seans@chiefaircraft.com (Sean Smithers)
Subject: Re: Update another frame from Perl script.
Message-Id: <34f36de8.114056716@news.meganews.com>
On Mon, 23 Feb 1998 11:13:38 -0600, "Rick Ryan"
<rickryan@datrixnet.com> wrote:
Your question is probably not a perl related item. You need to check
into your HTML scripting, specifically TARGET="NamedFrame". This will
allow your perl script to indicate the frame to display to.
>I'm building a messaging system with 2 frames. Frame 1 has a list of message
>headers. When the user clicks a message header I want to run a system
>program (with back ticks), then return the results (message text) to frame
>2. Oh yea, this is under (shudder) NT. Any suggestions?
------------------------------
Date: Tue, 24 Feb 1998 18:14:09 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: Why PERL? [Re: Beginner in trouble]
Message-Id: <34F36251.E514FE6F@mail.uca.edu>
Joseph N. Hall wrote:
>
> Something I've always wondered is where people get the
> uppercase PERL thing from. Any ideas?
>
Maybe it's because C is all in uppercase?
Cameron
camerond@mail.uca.edu
------------------------------
Date: 25 Feb 1998 01:07:45 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Why PERL? [Re: Beginner in trouble]
Message-Id: <6cvqt1$ljj@fridge.shore.net>
Cameron Dorey (camerond@mail.uca.edu) wrote:
: Maybe it's because C is all in uppercase?
Hmm. I C what you mean.
*ducking*
--
Nathan V. Patwardhan
------------------------------
Date: Tue, 24 Feb 1998 16:56:03 -0700
From: Jason Vallery <vallery@bvsd.k12.co.us>
Subject: win32 file handling. Deleting and Overwriting a file.
Message-Id: <Pine.GSO.3.96.980224164447.29895A-100000@bvsd.k12.co.us>
Hi!
we are running a NT server with IIS4.0 and Perl5 installed.
I have 2 questions:
1, What I need to do is check to see if a file exsists on the local
machine. If it does delete it.
2, We are setting up a worksheet on the web that requires several pages to
post to the same file. Each time they go to a new page the HTML file is
updated. The html file is a confirm page that contains all of the users
answers. When they get done with all of the questions/pages they recive a
redirect to the HTMl file that has been generated by our script. My problem
is that if they decide to make changed they start over and they are making the
changes but they are doing it on top of what is there. SO, I need to be
able to delete a specific field in the file..
For example the file looks like this:.
========================================
Tuesday, February 24, 1998 at 16:03:44
++++++++++++++++++++++++++++++++++++++++
1:Name:John Doe
2:Student Number:987654321
3:PIN:1234
4:Study Abroad: No
5:Summer Classes: Yes
6:Classes with Divison of Continuing Education: No
7:More than one term during summer: Yes
10A:Hours enrolled during summer:33
10B:Hours with division of continuing education:33
11:Veterans Benefits: No
12:Type of work: loan-and-work-study
13:Living with parents during the summer: Yes
So, say they mistyped thier SSN number. I need to have the script go back
in and change just that entry to thier new one.
Thanks...
_____________________________________________
/ __________ Jason Ray Vallery \
| | ___)_ |
| | _____) vallery@bvsd.k12.co.us |
| | ______) guide4@bvsd.k12.co.us |
| | _______) vallery@usa.net |
| \_______) vallery_j@gems.colorado.edu |
\_____________________________________________/
------------------------------
Date: Mon, 23 Feb 1998 22:40:52 GMT
From: roach@aol.net (Brian Roach)
Subject: Re: Year 2000 Compliance: Lawyers, Liars, and Perl
Message-Id: <34f1faa1.3954625@news.jic.com>
On 21 Feb 1998 19:06:10 GMT, Craig Franck <clfranck@worldnet.att.net>
wrote:
>>No, I wouldn't want to gamble on 64 bits being enough.
>
>The code won't break until after your long gone, so who cares? :-)
Didn't a famous COBOL programmer once say that?
:)
- Brian
------------------------------
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 1967
**************************************