[11145] in Perl-Users-Digest
Perl-Users Digest, Issue: 4745 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jan 25 17:07:21 1999
Date: Mon, 25 Jan 99 14: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 Mon, 25 Jan 1999 Volume: 8 Number: 4745
Today's topics:
Re: ancestry of perl features (Andrew M. Langmead)
Re: Arrays vs Hashes. <dennis.kowalski@daytonoh.ncr.com>
Re: Arrays vs Hashes. <tchrist@mox.perl.com>
Re: Can perl make popup window like Javascript (Abigail)
Re: Can you pattern match using an array? (Abigail)
Re: CGI, DB's and Browser Stop Button (Abigail)
Re: CGI.pm ? How can i install CGI.pm to my Unix server (Abigail)
Re: CGI.pm and Redirection question (Abigail)
Re: CGI.pm Warnings - popup menues (Richard Pearman)
Re: CGI/Perl: passing information to SSI? (Lee Brandson)
Re: Creating a standalone executable from a perl script (Martin Packer)
Re: Date actions using flatfile database (Abigail)
Re: Difficult issues not suitable for this newsgroup? (Randal L. Schwartz)
Re: Do you know a good Perl debugger free ? (Abigail)
Help compiling Perl w/ threads on Linux alex@digitalfoundry.com
Re: HELP!! Perl Viewer?? <famruud@online.no>
Re: how do I insert this in my HTML code? (Abigail)
Re: How do I Send a form to a printer ? (Abigail)
Re: How do I split this string? <phumpherys@utah-inter.net>
Re: How I can use post method without form tag ? (Abigail)
Re: How long would the Unixes last without Perl? dhosek@webley.com
How to calculate time difference? g200@my-dejanews.com
libwww and broken pipe? ftn@yesbox.net
Re: list of hashes mpeppler@mbay.net
Re: Newbie string question, please help :) (Sean McAfee)
perl and linux (Fernando)
Re: Perl Criticism [summary] Bleh@hotmail.com
Re: Perl Criticism [summary] aqumsieh@my-dejanews.com
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 25 Jan 1999 18:55:25 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: ancestry of perl features
Message-Id: <F64pwD.6rB@world.std.com>
dformosa@zeta.org.au (David Formosa (aka ? the Platypus)) writes:
>tied objects
These were in TCL long before the got added to Perl 5, but I'm really
unusre of the path they took (if any) before that.
--
Andrew Langmead
------------------------------
Date: Mon, 25 Jan 1999 14:43:20 -0500
From: Dennis Kowalski <dennis.kowalski@daytonoh.ncr.com>
Subject: Re: Arrays vs Hashes.
Message-Id: <36ACC958.3D9F@daytonoh.ncr.com>
jambutter@my-dejanews.com wrote:
>
> Can somewhene tell me when it is best recommened to use a hash as opposed to
> an array, and vice versa.
>
> Also, I'd like to know when it is necessary to use references and when it is
> not necessary at all.
>
> Thanks.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Depends on what the search criteria is.
If the search key to retrieve an element is a number (i.e. 5), an array
will work fine.
$indx = 5;
$element = $array[$indx];
If the search key is an alpha value (i.e. Joe), a hash is prefered
because you can access element "Joe" directly without traversing an
array until you come to the proper element.
$key = 'Joe';
$element = $hash{$key};
------------------------------
Date: 25 Jan 1999 10:33:23 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Arrays vs Hashes.
Message-Id: <36acaae3@csnews>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, jambutter@my-dejanews.com writes:
:Can somewhene tell me when it is best recommened to use a hash as opposed to
:an array, and vice versa.
Arrays are ordered lists of scalars, and as such are used for ordering.
You should use arrays when you want a list, a stack, a queue, or a tuple.
Hashes are associated sets of scalars, and as such are used for searching
(on single, discrete keys). Use hashes when you want a record, a table,
a set, a struct, a node, or a bag.
:Also, I'd like to know when it is necessary to use references and when it is
:not necessary at all.
You use references when you want pass-by-reference, when you want
aliasing, or when you want dynamic data structures that grow on the fly.
--tom
--
------------------------------
Date: 25 Jan 1999 18:39:55 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Can perl make popup window like Javascript
Message-Id: <78idpr$pkf$1@client2.news.psi.net>
leostar@mailcity.com (leostar@mailcity.com) wrote on MCMLXXIII September
MCMXCIII in <URL:news:78hgg8$aep$1@nnrp1.dejanews.com>:
** Hi
** I just want to know that can perl/CGI make a Popup Window like
** Jacascript. Because I see some page in Fortune city homepage when I click at
** edit page, it will popup a new window. But when I look at the page source. I
** can't see any code in Javascript Language.
** Would anyone tell me how they do that? I would use it in my project.
You would have to write a browser that can run Perl applets. Given that,
you can invent your own protocol to pop up windows. From there, it's
all down hill!
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
------------------------------
Date: 25 Jan 1999 19:37:02 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Can you pattern match using an array?
Message-Id: <78ih4u$qdv$1@client2.news.psi.net>
Bob Freedman (bfreedman@esdim.noaa.gov) wrote on MCMLXXIII September
MCMXCIII in <URL:news:36AC8DC9.66C04D87@esdim.noaa.gov>:
%% Can you match a pattern using an array of strings?
Most likely, but how depends on what exactly you mean with this question.
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
------------------------------
Date: 25 Jan 1999 19:43:15 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: CGI, DB's and Browser Stop Button
Message-Id: <78ihgj$qdv$2@client2.news.psi.net>
Jere Julian - Personal Account (julianje@mercury.interpath.com) wrote on
MCMLXXIII September MCMXCIII in <URL:news:78ht4q$bca$3@gaddy.interpath.net>:
"" Whenever a large database search is going on and a user cacels the action by
"" pressing stop on the browser, the Perl process appears to get stuck on the
"" process list and can only be killed by a restart. Now, I admit I am a UNIX
"" person forced into WinNT but here is my info.
Is your server giving any notification to your program? If not, then
that's the problem. If it is, use it.
But answers to those questions aren't found here, as they have nothing
to do with Perl.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
------------------------------
Date: 25 Jan 1999 19:44:27 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: CGI.pm ? How can i install CGI.pm to my Unix server ..t hank
Message-Id: <78ihir$qdv$3@client2.news.psi.net>
Penta kathir (kspenta@netcom.ca) wrote on MCMLXXIII September MCMXCIII in
<URL:news:ijRq2.489$134.5335@tor-nn1.netcom.ca>:
$$ I would like to install cgi.pm to my unix server ..could you please tell me
$$ how can i do it .. thanks in advance ..
Which part of the README didn't you understand?
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
------------------------------
Date: 25 Jan 1999 19:52:50 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: CGI.pm and Redirection question
Message-Id: <78ii2i$qdv$4@client2.news.psi.net>
I R A Aggie (fl_aggie@thepentagon.com) wrote on MCMLXXII September
MCMXCIII in <URL:news:fl_aggie-2401991154440001@aggie.coaps.fsu.edu>:
^^ In article <36AA9756.882949F1@bellsouth.net>, Steve Miles
^^ <nsurfer@bellsouth.net> wrote:
^^
^^ + print header;
^^ +
^^ + Then, in one of the subroutines I'm using later on I want to redirect
^^ + the user so I put this:
^^ + print $query->redirect(-location=>'http://www.yahoo.com');
^^ + exit;
^^ +
^^ + The problem is that the browser just "prints" the redirection and
^^ + doesn't send the user on to the site.
^^
^^ Then don't 'print header;'. According to CGI.pm:
^^
^^ header() returns the Content-type: header. You can provide
^^ your own MIME type if you choose, otherwise it defaults to
^^ text/html.
^^
^^ So, yeah, the browser does the right thing. Redirection works much better
^^ _without_ a content header...
RTFRFC:
If the new URI is a location, its URL SHOULD be given by the Location
field in the response. Unless the request method was HEAD, the entity
of the response SHOULD contain a short hypertext note with a
hyperlink to the new URI(s).
Steve's article showed a totally messed up HTTP header; the field names
and the values didn't match up. However, with the given information,
it's unclear whether the fault lies in CGI.pm, the server, any proxy in
between, or the browser. Perhaps Steve should telnet to the HTTP port
and type in the request.
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|8;
.qq;8768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F;
.qq;76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V
/=$^U}while$^V!=$^W'
------------------------------
Date: Mon, 25 Jan 1999 21:24:40 GMT
From: richardp@nucleus.com (Richard Pearman)
Subject: Re: CGI.pm Warnings - popup menues
Message-Id: <36ace0cf.2978198@news>
On Thu, 21 Jan 1999 17:11:31 -0800, "Xah Lee" <xah@bpower.com> wrote:
>>...
>>... (discussion on the keyword naming aspects of CGI.pm module)...
>
>The keyword naming is just a small area that CGI.pm really shines. Please
>allow me to elaborate.
>
>Sometimes a keyword MUST be preceded by a dash, sometimes the first letter
>MUST be capitalized, and with all that, sometimes the quote is necessary to
>prevent error messages when using "use strict".
Sorry, I missed the beginning of this discussion. This sounds like a
problem I'm having doing pop up menues. The page just terminates when
it gets to a subrouteen using a menue with labels and values from a
hash. The similar subrouteen with just has values from an array works
fine. However I'm not using strict, so is it just a matter of
capitalising the -values or something, or is there a bug the in the
module which causes inherent problems with this function?
Richard Pearman http://www.nucleus.com/~richardp/
------------------------------
Date: 25 Jan 1999 11:19:51 GMT
From: rlb@intrinsix.ca (Lee Brandson)
Subject: Re: CGI/Perl: passing information to SSI?
Message-Id: <rlb-2501990631450001@204.112.166.54>
In article <78an9t$j3i$1@client2.news.psi.net>, abigail@fnx.com wrote:
> M. Morgan (mmorgan@gladstone.uoregon.edu) wrote on MCMLXX September
> MCMXCIII in <URL:news:788ii3$6r$2@pith.uoregon.edu>:
> ""
> ""
> "" The SSI appears to be running from a command line on the server, so in that
> "" case how do I pass information to a perl script from the command line? Or
> "" am I missing it completely? Does anyone have a simple answer to this
> "" question?
SSIs running as CGIs get whatever query string you pass to the pages that
they run on. SSIs running as regular processes can be given arguments in
the #exec call.
> Read a group about HTTP servers. This isn't a Perl question.
Was that a Perl answer?
Lee Brandson
--
Lee Brandson, Burnt Lake Software and Intrinsix Canada
------------------------------
Date: Mon, 25 Jan 1999 14:37:21 -0500
From: mpacker@concentric.net (Martin Packer)
Subject: Re: Creating a standalone executable from a perl script (Win32)
Message-Id: <36b3c773.21101038@news.mindspring.com>
Thanks, Jim.
On Mon, 25 Jan 1999 16:47:55 GMT, jweisgram@hotmail.com (Jim Weisgram)
wrote:
:There is a shareware "Perl2Exe" that will convert the Perl script to an EXE
:file. Look on www.perl.com and find the Win32 section and I believe you will
:find it with little difficulty.
For others that are looking, the exact location is
http://www.demobuilder.com/perl2exe.htm.
:
:Why wouldn't the school want the Perl environment installed on the server? It
:could turn out to be useful in a number of ways.
I'm sure it could, but so far, even the computer instructor doesn't
program. I might load Perl later, but I thought I would try to get away
without for now.
Marty Packer
Elbow Technologies
"Reason with them, it drives them crazy"
------------------------------
Date: 25 Jan 1999 20:07:05 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Date actions using flatfile database
Message-Id: <78iit9$qqc$1@client2.news.psi.net>
Steve (me@me.com) wrote on MCMLXXIII September MCMXCIII in
<URL:news:78gnku$au2$1@news4.svr.pol.co.uk>:
^^ Hi,
^^
^^ I have setup a flatfile database for a shopping cart script. For each item
^^ in the database, I have added the release date of the item in the format
^^ DDMMYY (European). I have read all the help files and manual pages but they
^^ don't seem to helpful for what I need to do.
^^
^^ The date entry of DDMMYY is defined as $releasedate.
^^
^^ The two things I need to do is:
^^
^^ 1. Print the date in the format: DD/MM/YY (with the forward slashes) - how
^^ can I do this?
$releasedate =~ s{(..)(?=.)}{$1/}g; print $releasedate;
^^ 2. Compare the date in the database with the current system date. If the
^^ date in the database has passed already, I want it to print "available now",
^^ if it hasn't arrived yet I want it to say "coming soon". And if the date has
^^ passed in the last 14 days, I want it to say "new release". Anyone know how
^^ I can do this?
Well.... you're going to have a little problem here. If "YY" is 25, when
is that?
Abigail
--
sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))
------------------------------
Date: 25 Jan 1999 13:27:34 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Difficult issues not suitable for this newsgroup?
Message-Id: <m1pv839h6h.fsf@halfdome.holdit.com>
>>>>> "Andrew" == Andrew M Langmead <aml@world.std.com> writes:
Andrew> If that was the case, Randal's number should be used for someone in
Andrew> Boston. Or at least someone connected to the PBS kids show "Zoom".
Bingo! I was wondering if that meme would trigger anyone else!
"Send it to ZOOM! Zee Double-Oh Em, box three five oh, boston mass,
ooooohhhh, two ooonnnnee, three FOUUUURRR!"
Makes me wonder who has that box now, and if they still get Zoom-do
suggestions twenty years later. :)
Just another guy with a striped red-orange shirt, :-)
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 25 Jan 1999 20:23:35 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Do you know a good Perl debugger free ?
Message-Id: <78ijs7$qvt$1@client2.news.psi.net>
Jean Carfantan (jean@spirituel.com) wrote on MCMLXXII September MCMXCIII
in <URL:news:78f7cf$idu$1@front3.grolier.fr>:
== Do you know a good Perl debugger free ?
perl -w;
perl -Mstrict;
perl -D...;
perl -d;
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
------------------------------
Date: Mon, 25 Jan 1999 19:58:27 GMT
From: alex@digitalfoundry.com
Subject: Help compiling Perl w/ threads on Linux
Message-Id: <78iicu$4tc$1@nnrp1.dejanews.com>
I've tried compiling both the latest stable and dev sources with threads and
get errors with both. I am running Linux 2.0.35 and gcc 2.7.2.3 I haven't
had much experience so excuse any ignorance. I have searched hi and low for
help on threads before posting. Anyone have any pointers to resources I can
use?
Thanks,
Alex Soto
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 25 Jan 1999 21:25:23 +0100
From: "Henrik Ruud" <famruud@online.no>
Subject: Re: HELP!! Perl Viewer??
Message-Id: <78ijre$ger$1@readme.online.no>
I use a program called Winperl for this task. DOwnload it at
http://www.techdroid.net/acesoft/
Henrik
------------------------------
Date: 25 Jan 1999 20:54:56 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: how do I insert this in my HTML code?
Message-Id: <78iln0$r75$1@client2.news.psi.net>
Emulov (emulovNOSPAM@sin.khk.be) wrote on MCMLXXII September MCMXCIII in
<URL:news:78f0vq$f7g$1@nickel.uunet.be>:
[]
[]
[] Let's say I have a simple CGI script that just displays a line of
[] text, or a counter or something. I want this line to be displayed on a
[] .htm page. Which code do I put in my HTML code to achieve this?
Well, that's not a Perl question, is it? There are several answers
to this question, none of them appropriate to this group.
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
------------------------------
Date: 25 Jan 1999 20:55:48 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: How do I Send a form to a printer ?
Message-Id: <78ilok$r75$2@client2.news.psi.net>
Jim and Lois (kf4dmb@camcomp.com) wrote on MCMLXXIII September MCMXCIII
in <URL:news:36aa9e81@camcomp2.camcomp.com>:
~~ I am building a Help desk app . I would like users when the fill the form
~~ out and press
~~ a button they send it to the help desk printer.
I would like the users then as well.
Abigail
--
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))
------------------------------
Date: Mon, 25 Jan 1999 13:55:58 -0700
From: Phil Humpherys <phumpherys@utah-inter.net>
Subject: Re: How do I split this string?
Message-Id: <19990125135558.N16278@blackdog.slkc.uswest.net>
split first on white space, and then again on the ':'.
i.e.
($foo1, $foo2, $foo3, $foo4) = split (/\s+/,"inet addr:192.168.0.1
Bcast:192.168.0.255 Mask:255.255.255.0");
($addr, $ip) = split (/:/,$foo2);
print "This is the IP: $ip\n";
On Sun, Jan 24, 1999 at 04:32:54AM +0000 Ken Williams
(tekkin@hotmail.com) wrote:
+--------------------
> inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
>
> The above is from ifconfig. I need to pull the IP's out. Specifically the
> first. How do I split with a starting character of : and an ending character
> of space?
>
> For example:
>
> ($IP, $BC, $MASK) = split (/: ??? /);
>
> Anyone?
>
> Thanks.
>
--__-----------------------------------------------------------------------
/__)/ '/ )__/ _ / _ _ _ Phil Humpherys <phumpherys@utah-inter.net>
/ /)/( / /(///)/)/)(-/ (/_) Unix Systems Administrator, DriverSoft
/ / Mobile: +1.801.725.3257
---------------------------------------------------------------------------
Anybody that wants the presidency so much that he'll spend two years
organising and campaigning for it is not to be trusted with the office.
-- David Broder
------------------------------
Date: 25 Jan 1999 20:59:42 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: How I can use post method without form tag ?
Message-Id: <78ilvu$r75$3@client2.news.psi.net>
Claudio Villa Santa (claudio@ed-it.net) wrote on MCMLXXIII September
MCMXCIII in <URL:news:78hfhh$adh$1@news0-alterdial.uu.net>:
?? Hi,
??
?? I have a little problem I need to do a direct calling of a perl program,
?? something about this:
??
?? <a src="database.cgi?first=34&second=67">Send values</a>
??
?? but with more variable, and standard GET method send only first 256byte.
Then your browser is broken. Not that there are 256 bytes in
`database.cgi?first=34&second=67'.
?? How I can send it whit POST method?
That's beyond the scope of this newsgroup. Ask elsewhere.
va-pen.mailing-list.kidsnet for instance.
Abigail
--
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
${qq$\x5F$} = q 97265646f9 and s g..g;
qq e\x63\x68\x72\x20\x30\x78$&eggee;
{eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'
------------------------------
Date: Mon, 25 Jan 1999 21:05:07 GMT
From: dhosek@webley.com
Subject: Re: How long would the Unixes last without Perl?
Message-Id: <78im9s$8b6$1@nnrp1.dejanews.com>
In article <78i4so$o5h$1@client2.news.psi.net>,
abigail@fnx.com wrote:
> Kent Perrier (kperrier@blkbox.com) wrote on MCMLXXII September MCMXCIII
> in <URL:news:ysiaez9l1o8.fsf@blkbox.com>:
> !! abigail@fnx.com (Abigail) writes:
> !! > Doesn't HP ship perl4 by default? And doesn't RedHat come with some
> !! > form of Perl?
> !! I don't have any experience with HP-UX and I don't consider RedHat a
> !! commercial unix.
> What's your definition of a commercial Unix then?
I'd define a commercial Unix as one which you cannot get for free (special
vendor deals and larceny excepted). I'm loathe to put Redhat or any of the
other commercial Linux distributions into the same category as Ultrix, HPUX,
et al. What you're paying for in the case of Redhat and its ilk is
distribution rather than the OS itself.
As for the HP inclusion of Perl, I found no indication that HP does ship the
OS with Perl on their website & my last ocntract, where we were running HPUX
didn't have Perl installed by default on any of the machines, although that
could have just as easily been a side-effect of how the systems had been
configured.
-dh
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 25 Jan 1999 20:32:55 GMT
From: g200@my-dejanews.com
Subject: How to calculate time difference?
Message-Id: <78ikdn$6ni$1@nnrp1.dejanews.com>
Hi, All:
I have a list of strings like:
YYMMDD HHmmss
--------------------
990101 010101 start job1
990101 120151 end job1
990102 225959 start job2
...
-----------------------
I like to calculate the time-span in job1, job2....
I am thinking of transfer the start, and end timestamp into
'epoch sec', then i can do the math.
but How could i use perl functions (time, localtime...)
to convert the "YYMMDD HHMMSS" into epoch sec?
I hope i don't need any "module" because
my system adm won't feel happy about installing any 'optional'
stuffs....
Thanks.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 25 Jan 1999 19:02:52 GMT
From: ftn@yesbox.net
Subject: libwww and broken pipe?
Message-Id: <78if4k$1sr$1@nnrp1.dejanews.com>
Hi, I was wondering if someone got some nifty solution
to this problem:
If I try to get a page I get (very often) Broke pipe, and the program dies,
I've tried both get in LWP::Simple and
LWP::UserAgent
right now I use `lynx -source $url` instead, but I would prefer using the
libwww (so I can simulate being mozilla 4 or something, since some webpages
just sends an annoying message that I should get a better browser)
anyone?
all best,
/Calle
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 25 Jan 1999 18:54:09 GMT
From: mpeppler@mbay.net
Subject: Re: list of hashes
Message-Id: <78iekc$1dd$1@nnrp1.dejanews.com>
In article <788c48$f0f$1@nnrp1.dejanews.com>,
dhosek@webley.com wrote:
>
> It would have been nice if the docs had mentioned that you can get an actual
> array returned from ct_fetch and ct_sql rather than just a reference, or at
> least had been clearer about that.
Well - the docs for ct_fetch() certainly show that you can return an
array as that's the default behaviour.
> The docs also failed to give an example of
> the hash variant of ct_sql without a callback function.
I guess it's a question of understanding (or what is understood by
default values).
The docs for ct_sql() start with:
=item $ret|@ret = $dbh->ct_sql($cmd [, \&rowcallback [, $doAssoc]])
Runs the sql command and returns the result as a reference to an array
of the rows. Each row is a reference to an array of scalars. In a
LIST context, ct_sql returns an array of references to each row.
The items in the [ ...] section are optional. I believe that this is the
accepted way of presenting this information. And the default value for
a parameter that is not passed is undef (unless the callee decides to
use some other default).
OK - so maybe it's not as obvious as it could be - but I still think that
given a reasonable habit in reading perl documentation and using various
modules this should be clear enough. (but maybe I'll add a note to this
anyway :-)
Michael
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 25 Jan 1999 19:02:56 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: Newbie string question, please help :)
Message-Id: <Ad3r2.3867$Ge3.16796617@news.itd.umich.edu>
In article <MPG.1110137ec1f148669899ae@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
>In article <zqsp2.3141$Ge3.13792461@news.itd.umich.edu> on Wed, 20 Jan
>1999 22:05:19 GMT, Sean McAfee <mcafee@waits.facilities.med.umich.edu>
>says...
>> Perl's
>> regular expressions can handle just about any text-processing task you can
>> imagine. I always feel slightly dirty when I have to resort to substr() or
>> index().
>Even though they run faster in time-critical situations? :-)
Even though. I also feel dirty when using "return".
--
Sean McAfee | GS d->-- s+++: a26 C++ US+++$ P+++ L++ E- W+ N++ |
| K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
| tv+ b++ DI++ D+ G e++>++++ h- r y+>++** | umich.edu
------------------------------
Date: Mon, 25 Jan 1999 15:28:10 -0600
From: help@doit.wisc.edu (Fernando)
Subject: perl and linux
Message-Id: <help-2501991528100001@144.92.124.107>
I'm lerning perl.
I tried a couple of simple programs on unix. I have the line
"#!usr/bin/perl" as the very first line in my scripts. They work fine if i
just type the name of the program and its extension OR if i type "perl
name.cgi".
However, when I tried to run exactly the same program on two different
linux boxes (Caldera and Debian), the scripts will only run if I type the
whole thing (e.g. "perl name.cgi"). On this linux boxes, perl is located
at "/usr/bin/perl/" so the path seems to be the same.
Question: is there a way I can run my scripts in my linux boxes without
having to type "perl" in front of the name?
How?
If there isn't any way to do this, how do I make it so that a browser can
actually use the scripts (it say that the file name.cgi was not found on
this server)?
------------------------------
Date: Mon, 25 Jan 1999 19:47:47 GMT
From: Bleh@hotmail.com
Subject: Re: Perl Criticism [summary]
Message-Id: <36b6ca17.447326809@news.ford.com>
On Mon, 25 Jan 1999 11:10:59 +0000, iqbal <iqbal@orangenet.co.uk> wrote:
>Hi
>
>Dont suppose anyone has a summary to this thread :-)
>
>Iqbal
Killfile Fodder.
Put topmind in a Red Shirt and beam him down....
------------------------------
Date: Mon, 25 Jan 1999 21:06:32 GMT
From: aqumsieh@my-dejanews.com
Subject: Re: Perl Criticism [summary]
Message-Id: <78imcg$8d9$1@nnrp1.dejanews.com>
In article <36AC5143.5C56BD0D@orangenet.co.uk>,
iqbal <iqbal@orangenet.co.uk> wrote:
> Hi
>
> Dont suppose anyone has a summary to this thread :-)
Search dejanews at www.dejanews.com
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 12 Dec 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 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 4745
**************************************