[9514] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3108 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 9 15:07:17 1998

Date: Thu, 9 Jul 98 12:00:24 -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           Thu, 9 Jul 1998     Volume: 8 Number: 3108

Today's topics:
    Re: -- Abigail, Another Observation (brian d foy)
    Re: -- Abigail, Here's an update for you. (brian d foy)
    Re: -w on production code (was Re: better way of gettin (Charles DeRykus)
        Bug in Date::Format? (week number) <k.hofer@nortel.com>
        Compiling under HPUX 10 <chris@NOSPAM.fnord.room17.com>
    Re: Finding text between two tags on the same line? <tchrist@mox.perl.com>
    Re: Finding text between two tags on the same line? (Larry Rosler)
        Full-time position available for experienced Perl progr <kprime@mdli.com>
        grep lines from log file by date. infomancer@my-dejanews.com
    Re: HELP about cgi <quednauf@nortel.co.uk>
    Re: HELP about cgi (Josh Kortbein)
    Re: HTTP connections WITHOUT the libwww module? (brian d foy)
    Re: kill 0 always true?  How test pid? <westxga@ptsc.slg.eds.com>
    Re: new charter and moderator for comp.lang.perl.announ <jev@newton.pconline.com>
    Re: Perl based Web-to-database system <clint@netcomuk.co.ukXX>
    Re: perl HTTP/1.0 501 Not Supported (brian d foy)
        question on associative arrays <ez062634@mailbox.ucdavis.edu>
    Re: question on associative arrays (Craig Berry)
    Re: question on associative arrays (Josh Kortbein)
        Quick Sockets question - please help! (ACD Systems Ltd)
        Removing the ^M character <mikane@shell3.ba.best.com>
    Re: tough regexp - help needed otis@my-dejanews.com
    Re: tough regexp - help needed otis@my-dejanews.com
        Turning off buffering <henri.ossi@mail.htk.fi>
        what's wrong with this code? <markc@relationships.com>
        y2k <ez062634@mailbox.ucdavis.edu>
    Re: y2k (Larry Rosler)
    Re: y2k (Craig Berry)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 09 Jul 1998 14:36:49 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: -- Abigail, Another Observation
Message-Id: <comdog-ya02408000R0907981436490001@news.panix.com>
Keywords: from just another new york perl hacker

In article <35A2B6C0.2502@ziplink.net>, Webcruiser <dfsdf@ziplink.net> posted:

>Abigail, I did some more analysis by taking the @STATUS variable and
>writing it to a file called debug.dta, using the &updatestatus routine
>in my program. Up to the point where the code shown below is called, the
>debug.dta file shows the file WITHOUT spaces! Once the form code is
>called, the @STATUS variable gets screwed up. Here is the code section:

oh hell.  i wonder what the value of $" is.  read about that
variable and perhaps you'll solve your problem.

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>
try" $" = 'i don't need no stinking spaces!"


------------------------------

Date: Thu, 09 Jul 1998 14:33:49 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: -- Abigail, Here's an update for you.
Message-Id: <comdog-ya02408000R0907981433490001@news.panix.com>
Keywords: from just another new york perl hacker

In article <35A2B07F.415B@ziplink.net>, Webcruiser <dfsdf@ziplink.net> posted:

>Abigail, I did some more testing, calling the &getstatus and
>&updatestatus subroutines directly, bypassing the html form. I looed at
>the disk file and sure enough, the file was mot modified with spaces! It
>turns out that the spaces come in when I load the @STATUS as the default
>value in the form. The leading space shows up in the form, and becomes
>written to the output file. I still can't force it to go away. Here is
>the code that reads the environment variables and makes the variables:

>sub form_parse  {
>        # Get the input 
>        read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

[snip same old broken code]

>       $FORM{$name} = $value;

i wonder what that line does? :)

>        # print $name,", ",$FORM{$name},"<p>"; 
>        }     # End of foreach
>        }       #  End of sub


let's review for the home audience:  you refuse to use the standard
libraries and can't implemement it yourself, and seemingly expect
abigail to personally tutor you?

if you don't like CGI.pm, you could least dissect it to see how
it was done.  it's not very ugly code for the bits you need to 
see.

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: Thu, 9 Jul 1998 17:29:23 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: -w on production code (was Re: better way of getting the last modified file?)
Message-Id: <Evu8Kz.3pn@news.boeing.com>

In article <35A43CE9.12DE4274@aquila.com>,
Michael D. Schleif <mike.schleif@aquila.com> wrote:
>Wow!
>
>This is really the coolest thread in quite sometime!
>
>Let me toss this bone to the wolves:
>
>	If "-w" and "use strict" were compiled-in-standard in Perl, how would
>that affect the postings to clpm?  What would change here?
>

There'd be a thread about Perl and Fascism... trust me :) 

--
Charles DeRykus


------------------------------

Date: Thu, 09 Jul 1998 18:03:30 +0100
From: k hofer <k.hofer@nortel.com>
Subject: Bug in Date::Format? (week number)
Message-Id: <35A4F7E2.3600F4FF@nortel.com>

Hi,

I am using a script to get the week number:

#!/usr/stl/bin/perl5 -w

use Date::Format;

print "Day of the year: ", time2str("%j", time), "\n";
print "Week number starting with Sunday: ", time2str("%U", time), "\n";
print "Week number starting with Monday: ", time2str("%W", time), "\n";


The output for Thursday the 09 of July 1998 is:
=======================================
Day of year: 190
Week number starting with Sunday: 27
Week number starting with Monday: 27	<=====

=======================================

Produces the wrong week number when starting with Monday! Week should be
28.

I looked in the package Date::Format and it seems that the subroutine
wkyr is using
the incorrect year day ($yday). $yday = 189 and not 190 as correct.

Furthermore when the sub returns the result it uses int, which I think
is wrong,
instead it should use round. I am using a round function and it works;
well at least for today.

Any help greatly appreciated.

--
Konr@d


------------------------------

Date: 9 Jul 1998 18:06:45 GMT
From: Chris Farris <chris@NOSPAM.fnord.room17.com>
Subject: Compiling under HPUX 10
Message-Id: <6o30rl$eu5@netaxs.com>

Ok, Apperantly perl is  Memory faulting when running the op/flip test.
I've been able to narrow down the statement causing it:
    if ($x = /4/../8/) { $z = $x; print "ok ", $x + 0, "\n"; }
Line 11 of perl5.004_04/t/op/flip.t

HP-UX hpunited B.10.20 A 9000/735 2013520135 two-user license
compiling with gcc 2.8.1

I have been told that HPUX ships with a fubar linker, and that causes
problems in the shared libs, so I have told in not to use shared libs,
however that doesn't seem to have any effect.

Anyone compile perl5.004_04 under HPUX see simliar? Can you tell me how
to fix it? Do I need to shell out the $$ to get the good HP compiler?

Thanks
Chris

-- 
"I guess this finally explains where all those glowing, six-armed blue
   guys came from." -Lawrence Santana, on Indian Nuclear Testing


------------------------------

Date: 9 Jul 1998 17:57:44 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Finding text between two tags on the same line?
Message-Id: <6o30ao$33l$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    lr@hpl.hp.com (Larry Rosler) writes:
:I sure do know <THIS>, and I know the reasons why.  But blame the 
:original submitter, </THIS>:

I just don't like *any* regex solutions to tag matching questions
given without the appropriate caveats and provisos.

--tom
-- 
	    Blood and flood are not like food,
	    Nor is mould like should and would.


------------------------------

Date: Thu, 9 Jul 1998 11:23:23 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Finding text between two tags on the same line?
Message-Id: <MPG.100eaa734da15cf59896fb@nntp.hpl.hp.com>

[This followup was posted to comp.lang.perl.misc and a copy was sent to 
the cited author.]

In article <6o30ao$33l$1@csnews.cs.colorado.edu> on 9 Jul 1998 17:57:44 
GMT, Tom Christiansen <tchrist@mox.perl.com> says...
> In comp.lang.perl.misc, 
>     lr@hpl.hp.com (Larry Rosler) writes:
> :I sure do know <THIS>, and I know the reasons why.  But blame the 
> :original submitter, </THIS>:
> 
> I just don't like *any* regex solutions to tag matching questions
> given without the appropriate caveats and provisos.

In addition to the FAQs, we need a list of Frequently Supplied 
[Gratuitous] Responses (to questions that weren't asked), like Tom P's 
"Always always always check the result of open..."

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: Thu, 09 Jul 1998 10:30:04 -0700
From: "Kevin L. Prime" <kprime@mdli.com>
Subject: Full-time position available for experienced Perl programmer
Message-Id: <35A4FE1C.A6749A3F@mdli.com>

If you are an experienced Perl programmer, looking for a chance to
play Perl like a virtuoso and get paid for it, read on.

MDL Information Systems in San Leandro, CA, USA (San Franciso Bay
area) has an opening for an ongoing, full-time software developer
whose primary responsibility will be continuing development on a
multi-platform, multi-product automated test engine.  The system
allows our QA department to write tests that can be run against
several of our products on all the platforms they support, which at
last count included IRIX, AIX, OpenVMS on Alpha and VAX, NT on Intel,
and--soon to come--Windows 95/98.  It also automates test verification
and presentation of test results.  The program is implemented entirely
in Perl.

Here are some of the features of the system you'll get to work with:
Object-oriented design
Modules, including XS modules linked to our products' APIs
DBI/DBD to Oracle, mySQL
Perl for VMS
Perl for Win32
CGI programming with Apache/modperl
libnet functionality
Our own scripting language and its parser
OLE Automation through Perl

If you're interested in a big project that lets you think Perl all
day, please forward your resume to jobs@mdli.com and make sure you
mention that you're interested in position KP1.  If you'd like more
information about MDL, check our web site at http://www.mdli.com. 
I've copied the formal job description below.

Hope to hear from you!
Kevin

SOFTWARE ENGINEER

Job Description:
In this position, you will be responsible for developing, maintaining, 
and documenting in-house software used by the QA staff to test 
MDL's server products and core chemical technology.  In particular, 
you will be responsible for incremental development and 
maintenance of an existing software system that automates test 
execution, validation, and reporting on at least seven different 
computing platforms.  This position also includes some database 
maintenance and system administration.

Responsibilities:
*       Design and implement ongoing modifications to the existing 
        test automation system
*       Diagnose and correct problems with the test automation 
        system
*       Provide additional software tools as needed by the QA staff
*       Maintain chemical databases used by QA
*       Actively participates as a member of a QA team
*       Assist with the administration of 2-4 NT servers used by QA
*       Participate in test design, implementation, execution, and 
        follow-up as product schedules require

Minimum Qualifications:
*       Degree in computer science (or equivalent experience) or 
        chemistry
*       Minimum of five years' experience developing software for 
        use by others, either in a commercial or academic setting
*       Experience programming in Perl 5, including development of 
        modules and use of object-oriented features
*       Experience with object-oriented design
*       Experience building third-party software (e.g. Gnu software) 
        from source code
*       Excellent written and verbal communication skills
*       Ability to work as a specialist within a more general team
*       Strong personal drive to excel and to learn new skills
*       Some experience as a system administrator on one or more of
        the following operating systems:  Unix, Windows NT, 
        OpenVMS

Desired Qualifications:
*       Experience with professional software testing practices and 
        procedures
*       Background in (organic) chemistry
*       Advanced Experience with C/C++, Java, and/or Visual Basic
*       Familiarity with SQL
*       Knowledge of HTML, JavaScript, and CGI
*       Some experience with relational database technology

-- 
======================================================================
Kevin L. Prime                                         kprime@mdli.com
Manager, Chemical Gateways Quality Assurance      (510) 357-2222 x1291
MDL Information Systems, Inc.                      FAX: (510) 352-2870
14600 Catalina Street
San Leandro, CA 94577
======================================================================


------------------------------

Date: Thu, 09 Jul 1998 18:08:40 GMT
From: infomancer@my-dejanews.com
Subject: grep lines from log file by date.
Message-Id: <6o30v7$pr8$1@nnrp1.dejanews.com>

Hello, I am trying to grep lines from a log file between certain dates.  Each
line is dated in the format: 09/Jul/1998:12:01:13.  How would I grab the lines
between say Jul 2 and July 15 without reading in variables and a lot of
processing.  Some of my logs are over 30 megs!  Thanks for any help!

Chuck Asik
Summer Intern - Chrysler ITS

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


------------------------------

Date: Thu, 09 Jul 1998 17:56:09 +0100
From: "F.Quednau" <quednauf@nortel.co.uk>
Subject: Re: HELP about cgi
Message-Id: <35A4F629.7CC9EE90@nortel.co.uk>

Matteo wrote:
> 
> Hi, I'm Matteo from Italy.
> 
> I wrote a cgi program with perl to send multiple mails using:
> Print "to: address@domain.com\n";
> Print "from: address@domain.com\n";
> and so on
> 
> how to attach a file?
> I tried with
> Print "attach: address@domain.com\n";
> but it doesn't work.
> 
> Please help me and write me to matteo@gate2000.com
> 
> thank you very much
> 
> Matteo

Hello Matteo,
please don't be offended, but it seems that you don't understand the steps that
you have to undertake in order to achieve your task. As a first shot you could
look at my email attachment sender at my homepage. There are quite a few
comments & explanations to it. You're welcome to tell me where you didn't
understand the explanations, so that I can improve it, and consequently help
you!

Cheers


-- 
____________________________________________________________
Frank Quednau               
http://www.surrey.ac.uk/~me51fq
________________________________________________


------------------------------

Date: 9 Jul 1998 18:33:22 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: HELP about cgi
Message-Id: <6o32di$vc1$3@news.iastate.edu>

Matteo (matteo@gate2000.com) wrote:
: Hi, I'm Matteo from Italy.

: I wrote a cgi program with perl to send multiple mails using:
: Print "to: address@domain.com\n";
: Print "from: address@domain.com\n";
: and so on

: how to attach a file?
: I tried with
: Print "attach: address@domain.com\n";
: but it doesn't work.

Read up on MIME - it's not as straightforward as you seem to think.

This was not a perl question, and thus did not belong in this newsgroup.
If you think that your next question deals exclusively with CGI, you
might want to try posting it to (only) a CGI newsgroup instead.



Josh

--

__________________________________________
She had heard all about excluded middles;
they were bad shit, to be avoided.
            - Thomas Pynchon



------------------------------

Date: Thu, 09 Jul 1998 14:58:29 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: HTTP connections WITHOUT the libwww module?
Message-Id: <comdog-ya02408000R0907981458290001@news.panix.com>
Keywords: from just another new york perl hacker

In article <35A4DF8A.AB2820F@ral1.zko.dec.com>, jc@eddie.mit.edu posted:

>David Thompson wrote:
>> Is it possible to just import the useragent functions into a script?
>> (not my preferred solution, but workable).
>
>Sure.  All the code is available, and you can cut and paste as you
>see fit.  This can be useful especially if you are having performance
>problems.  You can go in and cut out just the things you need (and
>they things they need ...), and make a much smaller script with shorter
>load time.  It takes a bit of your time, but it's not that difficult.

not that i've ever done that, but i don't think i would try because
all all the inheritance and dependency problems:


sri[3] perldoc -m LWP::UserAgent | grep ^use
use strict;
user agent in Perl. It brings together the HTTP::Request,
use vars qw(@ISA $VERSION);
use HTTP::Date ();
use LWP ();
use LWP::Debug ();
use LWP::Protocol ();
use Carp ();
use AutoLoader ();
useful to specialize the get_basic_credentials() method instead.

sri[4] perldoc -m LWP::UserAgent | grep ISA
use vars qw(@ISA $VERSION);
@ISA = qw(LWP::MemberMixin);


and that's just a glance at one module.

-- 
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: Thu, 09 Jul 1998 14:09:57 +0000
From: Glenn West <westxga@ptsc.slg.eds.com>
Subject: Re: kill 0 always true?  How test pid?
Message-Id: <35A4CF35.2A3C@ptsc.slg.eds.com>

Larry P. Rosen wrote:
> 
> I want to determine if another process is still
> running.  The process happens to be a "detached"
> grandchild process.  I tried the "trick" on page 339
> of the camel book, sending signal 0.  Unfortunately
> that seems to always return 1 (true) on our irix 6.2.
> (Sample code follows).  Any ideas how to test for
> the process in a pretty portable way? (I need it
> to work on irix, linux, and Solaris).
> Thanks,
> Larry
> 
[code snipped]

Your problem is that you're not killing using the grandchild's pid. 
You're using a -1 (the parent doesn't have access to the child's
variables).  A pid of -1 is a special type of signal.  So your program
is working correctly, you just need a better way to specify the pid to
test.  Had you stuck an inactive pid with the kill, you would have a 0
in $status.


------------------------------

Date: 9 Jul 1998 17:15:42 GMT
From: John Erjavec V <jev@newton.pconline.com>
Subject: Re: new charter and moderator for comp.lang.perl.announce
Message-Id: <6o2tru$lgk$1@bell.pconline.com>

brian moore <bem@news.cmc.net> wrote:
: How about looking at it from the opposite side: have moderators that you
: trust, and a charter that allows commercial posts if the moderator
: concurs that the information is of value to the perl community?
: 
: This whole argument is sounding like nominating a Supreme Court judge
: where issue-of-the-week is the deciding factor, not whether the person
: has the wisdom to act wisely with unforseen cases.

One problem with having a loose charter, and letting the moderator decide
what should and should not go into the group is the matter of legal action.
People have been taken to court over their decisions on what to let
through, and what to reject.  If the charter can back up the decisions, it
would either be easier to defend against legal action, or legal action
might not be taken.  If it is just a matter of "I think this should go
through, and this shouldn't", no matter how benevolent and full of Wisdom
the moderator, there will be people that are pissed that their announcement
was rejected, and an announcement that they feel is similar was posted.
These people are the ones that might take legal action, and these are the
ones that a strong charter would help protect the moderator against.

Personally, I feel that the methodology proposed by Nathan is what I would
like to see in place on clpa.

-JEV
-- 
John Erjavec V	PGP fingerprint:
jev@pconline.com	7593 1B5A AE11 C0FE BA09  EB5E 8DE9 D2E5 BF5B 87AD
http://www.pconline.com/~jev/index.html


------------------------------

Date: Thu, 9 Jul 1998 19:57:05 +0100
From: "Clinton Gormley" <clint@netcomuk.co.ukXX>
Subject: Re: Perl based Web-to-database system
Message-Id: <6o33pv$i4a$1@taliesin.netcom.net.uk>

Useful - indeed yes

I am trying to write some contact management software for the financial
services community based on an html interface.

what u're tlaking about would be perfect

please keep me informed

Clinton Gormley

Joe Junkin wrote in message ...
>Hello all, I am the lead developer for a Perl-based Web Database
>application.
>
>I am posting this message to try and gain feedback and comments on our Data
>Crawler web-to-database application (www.datacrawler.com).
>
>I am interested in finding out from the Perl community if there is interest
>for a configurable, web-to-database HTML GUI for Perl.
>
>The key to Data Crawler is a Reusable Data Access Interface built in HTML
>generated from Perl code. This core component is the basis of the entire
>application and enables one to create interrelated storage systems quickly.
>
>This software is 100% HTML based. It is a configurable, reusable interface
>for exploring, displaying and editing database information.
>
>Does anybody see what is going on here? Does it make sense?
>
>Any feedback is welcome
>
>Thanks for your time,
>
>Joe Junkin
>
>jjunkin@datacrawler.com
>
>www.datacrawler.com
>
>




------------------------------

Date: Thu, 09 Jul 1998 15:03:47 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: perl HTTP/1.0 501 Not Supported
Message-Id: <comdog-ya02408000R0907981503470001@news.panix.com>
Keywords: from just another new york perl hacker

In article <35A4EFDB.234532D4@mch.sni.de>, Michael Derfler <michael.derfler@mch.sni.de> posted:

>>When I try to download the file i get the message:
>
>HTTP/1.0 501 Not Supported

>Does any one know a solution to this.

on a real operating system, i would check the ability of the 
server to POST to the target (probably reflected in the
exebutable permissions).  NT might have other notions, but
i've never tried to use it.

>I'm running a NT server with IIS 3.0 and perl5.001, (and FP98)

three strikes!

>All of my other scripts work fine.

what's different about this script?  find that and perhaps you
have found your problem.

-- 
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: Thu, 9 Jul 1998 10:32:46 -0700
From: Michael Nguyen <ez062634@mailbox.ucdavis.edu>
Subject: question on associative arrays
Message-Id: <Pine.GSO.3.96.980709102852.18394A-100000@catbert.ucdavis.edu>

i have been using this method for quite a while now... 

i define a 2d+ assoc array by declaring $arry{$arry2}{$arry3} =
<something>

I Want to define this array in such a way that less memory is used 
maybe $arry{$arry2}->{$arry3}???


thamnks
mike






------------------------------

Date: 9 Jul 1998 18:07:35 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: question on associative arrays
Message-Id: <6o30t7$h0v$1@marina.cinenet.net>

Michael Nguyen (ez062634@mailbox.ucdavis.edu) wrote:
: i have been using this method for quite a while now... 
: 
: i define a 2d+ assoc array by declaring $arry{$arry2}{$arry3} =
: <something>

Okay, that's saying that %arry is a hash, which has a key named by
the scalar $arry2.  The value associated with that key is a hash
reference; the hash refered to contains a key named by the scalar $arry3,
whose associated value is (something).  This is a standard hash-of-hashes
setup.

: I Want to define this array in such a way that less memory is used 
: maybe $arry{$arry2}->{$arry3}???

This means *exactly* the same thing.  Omitting the -> in the version you
gave above is just a matter of syntactic convenience.

I'm curious why you're concerned about memory use.  The hash-of-hashes
idiom is already a pretty memory-efficient way to implement sparse
matrices. 

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


------------------------------

Date: 9 Jul 1998 18:29:32 GMT
From: kortbein@iastate.edu (Josh Kortbein)
Subject: Re: question on associative arrays
Message-Id: <6o326c$vc1$2@news.iastate.edu>

Michael Nguyen (ez062634@mailbox.ucdavis.edu) wrote:
: i have been using this method for quite a while now... 

: i define a 2d+ assoc array by declaring $arry{$arry2}{$arry3} =
: <something>

: I Want to define this array in such a way that less memory is used 
: maybe $arry{$arry2}->{$arry3}???

A hash of hashes is supposed to be the preferable space-saving
away to store sparce matrices. If your array isn't sparse, you
could go back to normal arrays containing references to others,
as in man perllol.


Josh


--

__________________________________________
She had heard all about excluded middles;
they were bad shit, to be avoided.
            - Thomas Pynchon



------------------------------

Date: Tue, 7 Jul 1998 14:29:00 -0700
From: mweston@acdsystems.comNOSPAM (ACD Systems Ltd)
Subject: Quick Sockets question - please help!
Message-Id: <MPG.100c32fbfe5c52e5989684@news.island.net>

Hello,
I am writing a CGI that uses sockets to request a remote HTTP document.  
I can get the script to grab the document fine if I run it manually, but 
when run as a CGI, the socket does not seem to work.  It allocates the 
socket fine, binds it to the local host, and connects the socket to the 
remote host fine (or at least, those commands don't fail).
These are the variables I see when I print everything out:

Doc = /index.html
Port = 80
Server = www.perl.com
AF_INET = 2
SOCK_STREAM = 1
PROTOCOL = 6
HTTP Port = 80
IP = PIo0
Full IP  = 208.201.239.48
PackConnectIP = PPIo0
PackThisHostIP = 
Creating socket...
Socket = S
Form variables = 
URL = /index.html?
Printing to socket...
Returned from socket =

It returns the socket fine, but printing to the socket does not do 
anything!  And it works when I run it from the command line!! 
Anyone that knows what's happening please drop me a quick email and I 
will be eternally grateful.
mark


------------------------------

Date: 9 Jul 1998 18:30:31 GMT
From: <mikane@shell3.ba.best.com>
Subject: Removing the ^M character
Message-Id: <6o3287$rj0$1@nntp1.ba.best.com>

I am having trouble removing the ^M character from the end of a line.

I have tried

$line=~s/\r\n$//;
$line=s/\r$//;
$line=s/\n$//;

neither is working for me.

Is there another method?

I want to keep carriage returns within $line and delete the trailing.


Thanks


Mike




------------------------------

Date: Thu, 09 Jul 1998 16:47:45 GMT
From: otis@my-dejanews.com
Subject: Re: tough regexp - help needed
Message-Id: <6o2s7h$hrg$1@nnrp1.dejanews.com>

In article <6o0ok2$13f$4@client3.news.psi.net>,
  abigail@fnx.com wrote:
> otis@my-dejanews.com (otis@my-dejanews.com) wrote on MDCCLXXII September
> MCMXCIII in <URL: news:6o0i8c$tof$1@nnrp1.dejanews.com>:
> ++
> ++
> ++ out of curiosity - why is the regexp not a solution?
>
> Because HTML is basically CFL, and not a regular language.
>
> That has been explained over and over again in the past. Use
> dejanews.

So often that it appears 2 times (this includes the message above) in Dejanews
in comp.lang.perl.* :)
This should make it 3 :)

Thanks, I got the answer.

Otis

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


------------------------------

Date: Thu, 09 Jul 1998 16:49:28 GMT
From: otis@my-dejanews.com
To: cberry@cinenet.net
Subject: Re: tough regexp - help needed
Message-Id: <6o2sao$htg$1@nnrp1.dejanews.com>

In article <6o12t2$a38$3@marina.cinenet.net>,
  cberry@cinenet.net (Craig Berry) wrote:
> otis@my-dejanews.com wrote:
> : sounds like nobody knows the right regexp :(
>
> Nobody knows it 'cause there ain't none.  Such a regex does not exist in
> the same sense that a geometric method to square the circle or trisect the
> angle does not exist.  It is formally, rigorously *proveable* that such a
> regex does not exist.  If someone presents a regex to you which is alleged
> to solve the general HTML parsing problem, the presenter is lying or
> misinformed.

Thank you, this is a good answer, I appreciate it! You could have saves some
bandwidth and disk space had you jumped in earlier :)

Grazie,

Otis

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


------------------------------

Date: Thu, 9 Jul 1998 21:11:44 +0300
From: "Henri Ossi" <henri.ossi@mail.htk.fi>
Subject: Turning off buffering
Message-Id: <6o3176$i28$1@hiisi.inet.fi>

If I understanded it correctly, IE 4.0 does not support multipart documents.

So I thought of something else.
I need to just add another line to a html file, when its needed,
I don't have to send the whole document again.

So I want the browser to think, that I'm sending one big html file to it,
but actually im just giving it piece by piece.
(when I get the information I want to send)

I tried this code, its called nph-line.cgi
#--clip

$| = 1;

print<<_HEADER_;
HTTP/1.1 200 OK
Content-Type: text/html

_HEADER_

while(1)
{
print"Hello<BR>";
sleep(1);
}

#--clip

This does not work, IE waits and waits, it doesnt get the data straight from
the perl programs output.
How can this be done?

I use nph- in the start of the cgi script and $| = 1;
But they do shit. (if I may to use the expression)

Is there something wrong in the header?

I use PERL from www.activeware.com
and WebSite Professional (30 day trial period) as my server, my computer has
Win95
and I run the scripts with the same computer.

I cant find anything about buffering in the server docs or perl...or them
I've missed some spot.

Any ideas?
Please help.

-Henri Ossi





------------------------------

Date: Thu, 9 Jul 1998 11:53:38 -0700
From: "Mark Castillo" <markc@relationships.com>
Subject: what's wrong with this code?
Message-Id: <35a510a6.0@newsread.exodus.net>

hi, every time i run this it always says prints "Down!".
I try it with other hosts, and it always says it.

#!/usr/bin/perl -w

use Net::Ping;

$hostname = "localhost";
$timeout = 3;

if(pingecho($hostname, $timeout))
{
        print "Up!\n";
}

else
{
        print "Down!\n";
}







------------------------------

Date: Thu, 9 Jul 1998 10:36:51 -0700
From: Michael Nguyen <ez062634@mailbox.ucdavis.edu>
Subject: y2k
Message-Id: <Pine.GSO.3.96.980709103533.18394B-100000@catbert.ucdavis.edu>

localtime() returns the year as the current year minus 1900  how will this
affect localtime() when 2000 comes by ... whill it return 100?

mike





------------------------------

Date: Thu, 9 Jul 1998 11:01:11 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: y2k
Message-Id: <MPG.100ea53e6761f0ab9896fa@nntp.hpl.hp.com>

In article <Pine.GSO.3.96.980709103533.18394B-100000@catbert.ucdavis.edu> 
on Thu, 9 Jul 1998 10:36:51 -0700, Michael Nguyen 
<ez062634@mailbox.ucdavis.edu> says...
> localtime() returns the year as the current year minus 1900  how will this
> affect localtime() when 2000 comes by ... whill it return 100?

2000 - 1900 = ???

-- 
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


------------------------------

Date: 9 Jul 1998 18:17:51 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: y2k
Message-Id: <6o31gf$h0v$2@marina.cinenet.net>

Michael Nguyen (ez062634@mailbox.ucdavis.edu) wrote:
: localtime() returns the year as the current year minus 1900  how will this
: affect localtime() when 2000 comes by ... whill it return 100?

You'd think that, given that (as you say) localtime returns year - 1900,
as confirmed by 'perldoc -f localtime' ("Also, $year is the number of
years since 1900, that is, $year is 123 in year 2023"). 

However, inexplicably, in the year 2000 localtime's year field will be
1.327e46.  It will then be 101 in 2001, 102 in 2002, and so forth through
2023, as noted in the online doc.  In 2024, though, any call to localtime
will cause immediate and catastrophic physical damage to the computer on
which the call is made.

So, proceed with caution.  Teams of Perl experts are laboring to correct
these problems even as we speak, but who knows if they will prevail in
time? 

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


------------------------------

Date: 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 3108
**************************************

home help back first fref pref prev next nref lref last post