[9572] in Perl-Users-Digest
Perl-Users Digest, Issue: 3166 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 15 15:07:26 1998
Date: Wed, 15 Jul 98 12:00:40 -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, 15 Jul 1998 Volume: 8 Number: 3166
Today's topics:
Re: ***Can no one answer this question????*** (Steve Linberg)
Re: ***Can no one answer this question????*** (brian d foy)
AnyOne Please Help Me with Perl Script ! :-( travis4086@my-dejanews.com
Re: anyone working on CDO or CDONTS module? <tim@hcirisc.cs.binghamton.edu>
executing other applications???? <aha@moldyn.com>
Getting format with write to place spaces at the end of <sprugh@telution.com>
Re: Getting format with write to place spaces at the en <maierc@chesco.com>
Re: graphic production (brian d foy)
Re: Indentation <jdporter@min.net>
Re: Indentation <jdporter@min.net>
Re: passing variables by reference <Eric.Zylberstejn@wanadoo.com>
Re: Perl Beautifier Home Page (Ilya Zakharevich)
Re: Perl Beautifier Home Page <jdporter@min.net>
Re: perl IDE and compiler (Michael J Gebis)
Re: perl IDE and compiler <jdporter@min.net>
Re: perl IDE and compiler <scribble@pobox.com>
Re: perl IDE and compiler <jdporter@min.net>
Re: Perl zipping files?? <barnett@houston.Geco-Prakla.slb.com>
Please... Please help me with Perl Script ! :-( travis4086@my-dejanews.com
Re: Q: Changing IP address via perl (John Stanley)
Re: Silly things to do in Perl (or: is that Laptop wate (Steve Linberg)
Re: SMB and Timestamps <brentj@ext.msstate.edu>
Re: Sticking in NULL after split (Douglas Wilson)
Re: The three properties of programmers (Michael J Gebis)
Re: The three properties of programmers (Patrick Timmins)
Re: The three properties of programmers <scribble@pobox.com>
Re: use strict (M.J.T. Guy)
Re: working on /etc/passwd in a multi-user env. (brian d foy)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 15 Jul 1998 14:01:55 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: ***Can no one answer this question????***
Message-Id: <linberg-1507981401550001@projdirc.literacy.upenn.edu>
In article
<Pine.GSO.3.96.980715132052.38B-100000@armstrong.cs.Buffalo.EDU>, Bryan T
Hoch <bth@cs.buffalo.edu> wrote:
> This posting was previously called:
> Re: Placing output from System() call into an array from the file that
calls it?
> and I've posted the question about 3 times in the last month and half.
> Can someone who knows the answer PLEASE let me know? Thanks!
Maybe asking for free help isn't going to work on this problem. Surely
you don't expect that the world owes you a free answer to your question,
although one could mistake you that way from your tone. You could think
about hiring someone if you really need help.
Have you considered capturing output by using backticks?
$info = `rusers -l $lhostA` blah blah blah
Whether this works for you or not, you will probably get better results
from folks here if you don't use such an expectant tone. If you post a
question and nobody answers you, then maybe nobody can or wants to help
you (for free). Yelling louder and louder for ***answers!!!!*** will only
piss people off.
>
>
> On Thu, 9 Jul 1998, Bryan T Hoch wrote:
>
> >
> > In one of my Perl programs, I have a line that calls a system call to see
> > who is on line.
> >
> > if ((system ("rusers -l $hostA | fgrep $personA")) == 0){
> > }
> >
> > Basically it will check to see if $personA is on $hostA and if so, it will
> > place it in an array (somewhere in the if statement). At least that's what
> > I want it to do.
> > Right now, what it does is just spit out every single user on $hostA to
> > the screen (it doesn't take into account it's only looking for $personA.
> > How do I make it so it doesn't print it to the screen (rather to an array
> > or string in the program) and how do I do it so it only checks for
> > $personA, and not everyone on that host?
> > Thanks a lot to anyone who tries to help.
> > Bryan H
> >
> >
> >
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Wed, 15 Jul 1998 14:20:02 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: ***Can no one answer this question????***
Message-Id: <comdog-ya02408000R1507981420020001@news.panix.com>
Keywords: from just another new york perl hacker
In article <Pine.GSO.3.96.980715132052.38B-100000@armstrong.cs.Buffalo.EDU>, Bryan T Hoch <bth@cs.buffalo.edu> posted:
>This posting was previously called:
>Re: Placing output from System() call into an array from the file that calls it?
>and I've posted the question about 3 times in the last month and half.
>Can someone who knows the answer PLEASE let me know? Thanks!
nodoby owes you anything. you want service, give me the address to
which i can send the invoice.
>> if ((system ("rusers -l $hostA | fgrep $personA")) == 0){
>> }
i remember seeing a few anwsers to this question.
Subject: Re: Placing output from System() call into an
array from the file that calls it?
From: tadmc@flash.net (Tad McClellan)
Date: 1998/07/09
Message-ID: <b464o6.ea4.ln@localhost>
Newsgroups: comp.lang.perl.misc
Subject: Re: Redirecting output?
From: Tom Christiansen <tchrist@mox.perl.com>
Date: 1998/07/03
Message-ID: <6njg1t$5vd$5@csnews.cs.colorado.edu>
Newsgroups: comp.lang.perl.misc
Subject: Re: Redirecting output?
From: cberry@cinenet.net (Craig Berry)
Date: 1998/07/02
Message-ID: <6ngqpk$h65$1@marina.cinenet.net>
Newsgroups: comp.lang.perl.misc
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>
------------------------------
Date: Wed, 15 Jul 1998 18:27:44 GMT
From: travis4086@my-dejanews.com
Subject: AnyOne Please Help Me with Perl Script ! :-(
Message-Id: <6oisb0$csj$1@nnrp1.dejanews.com>
To any one who would love to take a minute and tell me how to do something:
I am creating a form online and I want to make a perl script that would take
the input from the first page, and go to a second page based on that input.
And then from the input on that page they get sent to another page based on
the previous input. ?????? Does any one think that they can help me ?
I figure I just need a bunch of "if,then" statements. And a place so if you
choose one item it skips all of the others and goes to another area in the
script with html printed for that choice ?
If you or any one like you or who ever is reading this and want's to help a 15
year old boy. PLease PLease Email me... Tfawcett@see.net
Any help is greatly appretiated !!
Thanks,
Travis Fawcett
tfawcett@see.net
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 15 Jul 1998 14:27:14 -0400
From: Tim Gray <tim@hcirisc.cs.binghamton.edu>
Subject: Re: anyone working on CDO or CDONTS module?
Message-Id: <t067gzx94t.fsf@hcirisc.cs.binghamton.edu>
mgjv@comdyn.com.au (Martien Verbruggen) writes:
> In article <t0ww9gjely.fsf@hcirisc.cs.binghamton.edu>,
> Tim Gray <tim@hcirisc.cs.binghamton.edu> writes:
> > At work we use MS Exchange and I would really like to get some more
> > functionality out of it. But the way most people do that is with
> > Outlook forms and other unfriedly or highly proprietary and costly
> > solutions. So I was wondering if anyone is working on a module to use
>
> How is Outlook any more proprietory and costly than Exchange?
Re-read the post. I am talking about getting information out of
exchange. I am not making a comparison of exchange and outlook.
Outlook forms are more proprietary than CDO because they are
completely non-portable. CDO is an API which could be accessed
through many programming languages. Some costly solution could be
from the companies who have partnered with Microsoft to provide
exchange solutions as opposed to a perl solution.
> > Microsoft's Collaborative Data Objects.
>
> And that's not propietory?
Not as much as an outlook form or Keyflow or WFX.
> Did you check CPAN to see if there's already something there? Did you
> check ActiveState's site?
I did not find anything on CPAN and activestate has very little on
their site and no places to download modules, and besides I prefer the
Sarathy port as it stays more current and works with other add-on
modules better than the activestate port. In addition I checked
dejanews as well as altavista. Also if someone was only toying with
it and it was in early Alpha they probably would not have put it on
CPAN yet, and I would appreciate being able to help test and the
author might also welcome outside testing.
I don't think my question was off-topic or an FAQ or anything else
deserving a rude response so I would appreciate it if you would not
jump down my throut for no apparent reason.
> Martien
> --
> Martien Verbruggen |
> Webmaster www.tradingpost.com.au | "In a world without fences,
> Commercial Dynamics Pty. Ltd. | who needs Gates?"
> NSW, Australia |
------------------------------
Date: 15 Jul 1998 18:29:58 GMT
From: "Aquil Abdullah" <aha@moldyn.com>
Subject: executing other applications????
Message-Id: <01bdb01c$fbf12660$3e0210ac@krusty.moldyn.com>
I am trying to write a perl script that will start an application. I
created an HTML form that asks for the executables name. I know how to
decode the data that the Web Browser sends to the Web Server, but when I
use the system() function with the string that the user inputs the system
just hangs. I am runnig IIS on aN NT box. I know that there are issues of
permissions to be dealt with, but what other issues are involved in such a
task?
Here is an example? I have written a C application that asks fir a users
name and address and then updates a text file. I want to be able to start
this application running from a web browser. Or say I wanted to start
notepad running. Where does the execution take place and do I have to
concern myself with network issues???
Any answers? I've go plenty of questions.
--
Aquil Abdullah
aha@moldyn.com
------------------------------
Date: Wed, 15 Jul 1998 13:04:39 -0500
From: "Scott T. Prugh" <sprugh@telution.com>
Subject: Getting format with write to place spaces at the end of line?
Message-Id: <6oiqt3$m5h$1@eve.enteract.com>
Take the following example:
format FOO =
@<<<<< @<<<<< @<<<<<<<<<<<
$id,$name,$spaces
.
$id="130";
$name="bar";
$spaces = " "; # 12 spaces
$~ = "FOO";
write;
My output is
130 bar
without the spaces.
I need the spaces as a filler. How would I do this?
Regards,
Scott
------------------------------
Date: Wed, 15 Jul 1998 18:29:43 GMT
From: Charles Maier <maierc@chesco.com>
Subject: Re: Getting format with write to place spaces at the end of line?
Message-Id: <35AB0498.2BF8@chesco.com>
Scott T. Prugh wrote:
>
> Take the following example:
>
> format FOO =
> @<<<<< @<<<<< @<<<<<<<<<<<
> $id,$name,$spaces
> .
>
> $id="130";
> $name="bar";
> $spaces = " "; # 12 spaces
>
> $~ = "FOO";
> write;
>
> My output is
> 130 bar
>
> without the spaces.
>
> I need the spaces as a filler. How would I do this?
>
> Regards,
> Scott
Why would you do this? :O)..Works for me. It depends on what you want
the spaces "for" I think. If it is to space for another 'write'.. the
next write will be on another line.
format FOO =
@<<<<< @<<<<< @<<<<<<<<<<<@<<<<<
$id,$name,$spaces,$fill
.
$id="130";
$name="bar";
$spaces = " "; # 12 spaces
$fill = "xxxx";
$~ = "FOO";
write;
write;
OUTPUTS:
130 bar xxxx
130 bar xxxx
--
Chuck Maier
CDM Consulting Services
http://www.cdmcon.com
(610) 943-2726
------------------------------
Date: Wed, 15 Jul 1998 14:50:08 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: graphic production
Message-Id: <comdog-ya02408000R1507981450080001@news.panix.com>
Keywords: from just another new york perl hacker
In article <35ABFFE6.58F2@exchange.ch.ml.com>, Tootedom@exchange.ch.ml.com posted:
>I need some serious help.
>
>Does anybody have any clues on the following problem.
>
>I have a list of numbers in an ascii text file, which I want to pass to
>a cgi script, which will then convert these numbers into a graphic that
>I can view on my web browser, by grapic I mean chart, graph.
at which point in that multistep process are you stuck?
perhaps a perusal of the CPAN modules will help you find some tools
to use and to make your life easier.
good luck ;)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers Travel Deals! <URL:http://www.pm.org/travel.html>
------------------------------
Date: Wed, 15 Jul 1998 18:47:26 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Indentation
Message-Id: <35ACFAE1.4A6D@min.net>
Tushar Samant wrote:
>
> In any case I still
> think having shiftwidths LESS than tabstops is the worst and causes
> weird outdents.
That is absolutely not a problem, if one never uses tabs.
I never use tabs. And I use shift (shiftwidth=2 is my preference).
No problem.
--
John Porter
We have enough youth, how about a fountain of smart?
------------------------------
Date: Wed, 15 Jul 1998 18:49:12 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Indentation
Message-Id: <35ACFB4C.2CC0@min.net>
Andre L. wrote:
>
> My feeling is that tabs are useful only in the context of a file format
> that has the ability to record the positions of the tab stops, not in a
> text-only format. Am I wrong in thinking that way?
That's a good way of looking at it.
However, in such programs, you don't really know, nor even care, how
or whether the program is storing literal tab characters, or whatever.
--
John Porter
We have enough youth, how about a fountain of smart?
------------------------------
Date: Wed, 15 Jul 1998 20:39:20 +0200
From: Eric Zylberstejn <Eric.Zylberstejn@wanadoo.com>
Subject: Re: passing variables by reference
Message-Id: <35ACF758.F88AD8D5@wanadoo.com>
Hello,
Larry Rosler wrote:
>
> In article <35ACA496.9CF1B213@wanadoo.com> on Wed, 15 Jul 1998 14:46:14
> +0200, Eric Zylberstejn <Eric.Zylberstejn@wanadoo.com> says...
> > Incidentally, you don't need to use join() to print a list, set the $" variable
> > instead.
>
> In fact, you *do* need to use join() to print a list. What you are doing
> above is printing an *array*, which gets expanded when interpolated
> within double-quotes into a list of its elements joined by the value of
> $".
And how about :
$, = '--';
print @liste1;
print "\n";
Eric
------------------------------
Date: 15 Jul 1998 18:23:44 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Perl Beautifier Home Page
Message-Id: <6ois3g$akn$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to John Porter
<jdporter@min.net>],
who wrote in article <35ACD585.3D4@min.net>:
> Ilya Zakharevich wrote:
> >
> > [A complimentary Cc of this posting was sent to Tom Christiansen
> > <tchrist@mox.perl.com>],
> > who wrote in article <6ob6ql$rd8$1@csnews.cs.colorado.edu>:
> > > :CPerl works on Perl code. What is at this URL is not Perl.
> > >
> > > Yeah, right. My Perl compiler works find on it, and so does yours.
> >
> > Which proves nothing. It is not Perl4, since it uses isn't_programmer
> > without leading &, and is not Perl5 since it uses isn::t_programmer
> > without ::. Thus it is not Perl.
>
> Whoa.
> If what you're saying is true, then there is no Perl interpreter;
> the machine we have does not conform to the specification.
Failed logic. Perl4 code is not Perl5 code, but it is parsed by Perl
v5 interpreter. There is no restrictions what code is *illegal*, but
there are tons of descriptions of what is *legal*.
But why
aa/bb/;
parses still beats me hard! ;-)
> Personally I favor the notion that the interpreter defines the
> language, and the documentation exists to express the behavior of
> the interpreter for human readers. I.e. that there is a doc bug.
>
> But you take the opposite viewpoint.
There is no "the interpreter". My home machine has hundred(s?) of
versions of perl, all slightly different.
Ilya
------------------------------
Date: Wed, 15 Jul 1998 18:53:22 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Perl Beautifier Home Page
Message-Id: <35ACFC45.4890@min.net>
Russ Allbery wrote:
>
> People who program in more than 80 columns aren't the incarnation of evil,
> but they rank up there in the hierarchy of darkness. ;) Sorry, I refuse
> to ever use more than 80 columns; it's harder to read. I definitely don't
> want to see code if it's more than 80 columns.
Exactly, and for essentially the same reasons to never use tabs.
I've been burned (well, rubbed really hard the wrong way) too many
times,
by having a file someone (maybe me) created with a width >80, and having
to view it in a window of width=80. First thing I do is go and reformat
it so it fits in 80. What a waste of energy.
--
John Porter
We have enough youth, how about a fountain of smart?
------------------------------
Date: 15 Jul 1998 18:10:40 GMT
From: gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
Subject: Re: perl IDE and compiler
Message-Id: <6oirb0$pvk@mozo.cc.purdue.edu>
"Greg Rebuck" <Gregory.Rebuck@digital.com> writes:
}Okay, I just tried the Perl-to-C-to-binary procedure with a bonehead simple
}Perl script and it worked fine (the executable came out to 850K!) Bothers
}me still that the guy who wrote it seems to have lost interest and therefore
}it just sits out there collecting dust.
}If anyone knows what happened to Malcolm Beattie let us all know.
He's working on some minor release of some obscure software package or
something, I heard.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Wed, 15 Jul 1998 18:34:01 GMT
From: John Porter <jdporter@min.net>
Subject: Re: perl IDE and compiler
Message-Id: <35ACF7BC.1E02@min.net>
scott@softbase.com wrote:
>
> Perl is its own compiler. (How many languages can say THAT?)
Many. There's nothing unusual about a language and its
implementing program having the same name. Of course,
most of the high-profile languages happen to not do it
that way.
--
John Porter
We have enough youth, how about a fountain of smart?
------------------------------
Date: 15 Jul 1998 13:47:33 -0500
From: Tushar Samant <scribble@pobox.com>
Subject: Re: perl IDE and compiler
Message-Id: <6oitg5$q7n@tekka.wwa.com>
gebis@albrecht.ecn.purdue.edu writes:
>"Greg Rebuck" <Gregory.Rebuck@digital.com> writes:
>
>}Okay, I just tried the Perl-to-C-to-binary procedure with a bonehead simple
>}Perl script and it worked fine (the executable came out to 850K!) Bothers
>}me still that the guy who wrote it seems to have lost interest and therefore
>}it just sits out there collecting dust.
>
>}If anyone knows what happened to Malcolm Beattie let us all know.
>
>He's working on some minor release of some obscure software package or
>something, I heard.
Unobfuscated: He was for the most part the pumpkin holder for the
very major 5.005 release, whose public beta (?) is out, and which
comes with the compiler.
------------------------------
Date: Wed, 15 Jul 1998 18:43:08 GMT
From: John Porter <jdporter@min.net>
Subject: Re: perl IDE and compiler
Message-Id: <35ACF9DF.7F76@min.net>
Greg Rebuck wrote:
>
> If anyone knows what happened to Malcolm Beattie let us all know.
The nerve.
Malcolm does more in a month in the cause of Perl, than you or I
will do in a lifetime.
--
John Porter
We have enough youth, how about a fountain of smart?
------------------------------
Date: Wed, 15 Jul 1998 12:34:10 -0500
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
To: e.christensen@netjob.dk
Subject: Re: Perl zipping files??
Message-Id: <35ACE812.49F705B8@houston.Geco-Prakla.slb.com>
[courtesy cc to cited author]
Ernst Christensen wrote:
>
> Hi
> I have a Perl program running on a server, that produces a nummber of
> html-files. My problem is to make a perlscript, that can zip theese
> files.
> I have tried with pkzip etc.. something like this:
>
> system("pkzip.exe new.zip file.htm")
>
> But (ofcource) this dosn't work, since the server can't recognize
> pkzip.exe.
Why can't the server recognize it? (I'm going to assume your server is
Win 95/NT based, since you don't say, but are talking about pkzip.)
Do you get an error message?
What is the message?
What happens if you include the entire path to pkzip.exe in the
command? i.e. system("c:/pkzip/pkzip.exe new.zip file.htm"); (I think
that will work, if not use c:\\pkzip\\pkzip.exe instead)
Perhaps your path isn't set correctly on the server so pkzip.exe cannot
be found?
Perhaps the script is running as an unpriviledged user, and has no
access to pkzip.exe, even if it does find it.....
Perhaps winzip might be an alternative?
Maybe you could check to see if you are getting a return code from
pkzip, something like: system(...) == 0 or die "Cannot execute pkzip:
$!\n"; should hopefully provide some insight, if it falls over.
> Any solutions (i have checked CPAN)
I don't know where it is, exactly, but I thought there was a module for
gzip/gunzip. As I understand things, gzip is the (originally) unix
equivalent to pkzip/pkunzip (winzip 6.2 understands gzipped files).
Maybe that would work for you? I think gzip is a freeware product
available at http://www.fsf.org, but don't quote me on that. In theory
it could be compiled on a Win* style OS.
>
> reg
> Ernst
Keep in mind, I deal with unix 99% of the time, so my responses may be
'crack-pot' at best, but I think it should give you a place to start
looking.
HTH.
Dave
--
"Security through obscurity is no security at all."
-comp.lang.perl.misc newsgroup posting
----------------------------------------------------------------------
Dave Barnett U.S.: barnett@houston.Geco-Prakla.slb.com
DAPD Software Support Eng U.K.: barnett@gatwick.Geco-Prakla.slb.com
----------------------------------------------------------------------
------------------------------
Date: Wed, 15 Jul 1998 18:33:23 GMT
From: travis4086@my-dejanews.com
Subject: Please... Please help me with Perl Script ! :-(
Message-Id: <6oislj$d4p$1@nnrp1.dejanews.com>
To any one who would love to take a minute and tell me how to do something:
I am creating a form online and I want to make a perl script that would take
the input from the first page, and go to a second page based on that input.
And then from the input on that page they get sent to another page based on
the previous input. ?????? Does any one think that they can help me ?
I figure I just need a bunch of "if,then" statements. And a place so if you
choose one item it skips all of the others and goes to another area in the
script with html printed for that choice ?
If you or any one like you or who ever is reading this and want's to help a 15
year old boy. PLease PLease Email me... Tfawcett@see.net
Any help is greatly appretiated !!
Thanks,
Travis Fawcett
tfawcett@see.net
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 15 Jul 1998 18:16:09 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Q: Changing IP address via perl
Message-Id: <6oirl9$qu7$1@news.NERO.NET>
In article <35A8B682.C46C6239@whatsamattau.edu>,
Bullwinkle <at@whatsamattau.edu> wrote:
>I routinely move my laptop between the ethernet at work and an ethernet
>at home. I've got the changes needed down to just changing the IP
>address and rebooting. However, it's still kludgey.
>
>1) Is there a perl module that will let me write a script to change the
>machine's IP address?
Much easier to just swap hosts files with mv. Create hosts.home and
hosts.work with the correct addresses. Then "mv /etc/hosts.home
/etc/hosts" or "mv /etc/hosts.work /etc/hosts".
>2) Any conceivable way to "restart" just the ip stack, rather than the
>entire machine?
ifconfig eth0 down
/etc/rc.inet1
------------------------------
Date: Wed, 15 Jul 1998 14:16:55 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Silly things to do in Perl (or: is that Laptop waterproof?)
Message-Id: <linberg-1507981416550001@projdirc.literacy.upenn.edu>
In article <35A5F598.985CCD6B@nortel.co.uk>, "F.Quednau"
<quednauf@nortel.co.uk> wrote:
> Oh *shish*, you're all a bunch of perfectionists :)
That's *sheesh*, not *shish*. :)
PS: :)
PPS: :) :) :)
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: 15 Jul 1998 18:22:41 GMT
From: Brent Johnson <brentj@ext.msstate.edu>
Subject: Re: SMB and Timestamps
Message-Id: <6ois1h$e28$1@nntp.msstate.edu>
In comp.protocols.smb Larry Rosler <lr@hpl.hp.com> wrote:
> In article <6oil31$aph$1@nntp.msstate.edu> on 15 Jul 1998 16:24:01 GMT,
> Brent Johnson <brentj@ext.msstate.edu> says...
>> I am trying to write a Perl script which scans through a common
>> public directory and moves any files older than a certain date
>> to another directory. Problem is, when someone saves a file to
>> a mounted SMB filesystem, it keeps the original file date.
>>
>> Is there a way to 'touch' files when they are copied? Or some
>> other way? I've looked at the creation times (same as it is
>> on their PC's), modified times (no help there) and the 'atime' ..
>> which I have no idea what that is.. but it isnt correct.
>>
>> Any help would be appreciated,
>>
>> - Brent
> Look at `perldoc -f utime`. The utime() function should let you do what
> you want, and is OS-independent, whereas the `touch` command is OS-
> dependent.
Thanks, but that does not answer my original question. I used 'touch'
in the simplest terms, I did not mean an actual 'touch'. I will
rephrase it .. when users copy files from their local hard
drives to their SMB mounted drives (using samba for solaris), the files
have the same timestamp as they did when they were on their harddrives.
I want the time the files were actually created on the system - and
ctime, mtime nor atime seem to show me that information.
- Brent
------------------------------
Date: Wed, 15 Jul 1998 18:26:14 GMT
From: dgwilson@gte.net (Douglas Wilson)
Subject: Re: Sticking in NULL after split
Message-Id: <6ois82$7eq$1@news-1.news.gte.net>
On Wed, 15 Jul 1998 09:12:20 -0700, Nathan Franzen
<franzen@pmel.noaa.gov> wrote:
>On 15 Jul 1998, Mark-Jason Dominus wrote:
>p.s. But how do you get an array of length 11 out of
>
>@array = split /,/, '1,2,3,,5,,,,,,,'; ?
>
>Here's how:
>
>@array = split /,/, '1,2,3,,5,,,,,,,', -1;
>pop @array;
>
>But isn't that a little clunky?
Not really, its rather arbitrary whether or not a delimiter at
the end of the string means that the last field is NULL
(In which case you don't need the pop) or whether the last
field is before the delimiter (in which case you do need
the pop or a substitute before the split).
And the behavior of split regarding a negative limit
is documented in perldoc perlfunc.
Cheers,
Douglas Wilson
------------------------------
Date: 15 Jul 1998 18:06:19 GMT
From: gebis@albrecht.ecn.purdue.edu (Michael J Gebis)
Subject: Re: The three properties of programmers
Message-Id: <6oir2r$pqj@mozo.cc.purdue.edu>
"Mark Stang" <markstang@ncgroup.com> writes:
}I am racking my brain trying to remember the three properties of
}programmers, as per the Camel book. Alas, I do not have my copy with me.
}I can remember 2 of them: laziness and hubris...please someone tell
}me...what is the third?
The inability to avoid making a joke when the opportunity presents
itself.
--
Mike Gebis gebis@ecn.purdue.edu mgebis@eternal.net
------------------------------
Date: Wed, 15 Jul 1998 18:42:57 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
Subject: Re: The three properties of programmers
Message-Id: <6oit7h$e25$1@nnrp1.dejanews.com>
In article <s7p3ec3ur6w.fsf@serinde.elsevier.nl>,
Piers Cawley <pdcawley@bofh.org.uk> wrote:
> "Mark Stang" <markstang@ncgroup.com> writes:
>
> > I am racking my brain trying to remember the three properties of
> > programmers, as per the Camel book. Alas, I do not have my copy with me.
> >
> > I can remember 2 of them: laziness and hubris...please someone tell
> > me...what is the third?
>
> So, rather than wait 'til you got to where your books were you got
> impatient and asked the 'net instead. Good call, not only are you too
> lazy to check the references yourself but you have sufficient hubris
> to think that everyone else would be interested.
>
> --
> Piers Cawley
Good one! But does he have too much hubris to see the wisdom of your response,
or is he too lazy to even check back? :) It may presume all to infer even no
code elucidates. But, who knows?
Patrick Timmins
U. Nebraska Medical Center
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 15 Jul 1998 13:57:39 -0500
From: Tushar Samant <scribble@pobox.com>
Subject: Re: The three properties of programmers
Message-Id: <6oiu33$rd7@tekka.wwa.com>
linberg@literacy.upenn.edu writes:
>In article <s7p3ec3ur6w.fsf@serinde.elsevier.nl>, Piers Cawley
><pdcawley@bofh.org.uk> wrote:
>
>> "Mark Stang" <markstang@ncgroup.com> writes:
>>
>> > I am racking my brain trying to remember the three properties of
>> > programmers, as per the Camel book. Alas, I do not have my copy with me.
>> >
>> > I can remember 2 of them: laziness and hubris...please someone tell
>> > me...what is the third?
>>
>> So, rather than wait 'til you got to where your books were you got
>> impatient and asked the 'net instead. Good call, not only are you too
>> lazy to check the references yourself but you have sufficient hubris
>> to think that everyone else would be interested.
>
>Which means he's a good programmer!
That's what I have been trying to tell all the FAQ-thumpers out here.
Good programmers ask the net.
------------------------------
Date: 15 Jul 1998 18:07:56 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: use strict
Message-Id: <6oir5s$ihc$1@pegasus.csx.cam.ac.uk>
In article <6oio53$gbn$1@ocean.cup.hp.com>, Gil Brown <gil_brown@hp.com> wrote:
>I trying to learn perl5 (I've only written stuff in 4 so far) and I am
>having a problem with use strict. All I want to do is read from a file
>(simple enough) and when I uncomment use strict nothing works and it does
>when I comment it.
While developing scripts, and especially when trying to something like
make an old script "use strict" clean, I strongly suggest you
include early on
use diagnostics;
(or put -Mdiagnostics on the command line). Then Perl will provide
an expanded explanation of the problem. In your case, you would have
got
Global symbol "$line" requires explicit package name
(F) You've said "use strict vars", which indicates that
all variables must either be lexically scoped (using
"my"), or explicitly qualified to say which package the
global variable is in (using "::").
which shows you two ways of fixing the problem. (You probably want to
go the "my" route.)
Mike Guy
------------------------------
Date: Wed, 15 Jul 1998 14:52:33 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: working on /etc/passwd in a multi-user env.
Message-Id: <comdog-ya02408000R1507981452330001@news.panix.com>
Keywords: from just another new york perl hacker
In article <6oiek2$9gf$1@platane.wanadoo.fr>, "Freddy" <fgueant@orka-intl.com> posted:
>I want to write a script that edit /etc/passwd and/or /etc/shadow, but this
>script is going
>to be called by a http way... it mean two users can send this script, but i
>want the two
>to modify the file, one after the other, in their order of appearance...
>how can i manage it? i'm working on redhat4.2 with perl5.002 (or 3, or 4,
>don't remember..)
This quarter's The Perl Journal (issue 10) presents an in-depth
discussion of this problem along with a script to do the task.
good luck :)
--
brian d foy <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
The Perl Journal <URL:http://www.tpj.com>
------------------------------
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 3166
**************************************