[12031] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5631 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 11 16:07:18 1999

Date: Tue, 11 May 99 13:00:18 -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           Tue, 11 May 1999     Volume: 8 Number: 5631

Today's topics:
        Anyone willing to spare a shoulder ? <carol@herb4.freeserve.co.uk>
    Re: Anyone willing to spare a shoulder ? <swarren@www.wwwdotorg.org>
    Re: Bug in Perl 5.005_03 for win32 on NT machine ?? <swarren@www.wwwdotorg.org>
    Re: Build Problem <swarren@www.wwwdotorg.org>
        CPAN shell with Win95 - HOW??? <edatwork@REMSPAMinternethut.com>
    Re: How process a file? <yangc@ra.comm.mot.com>
    Re: How process a file? (Larry Rosler)
    Re: how to test if a directory exist? <swarren@www.wwwdotorg.org>
    Re: Learning Perl - help, please ! (I R A Aggie)
    Re: newbie need help - Windows vs Linux <swarren@www.wwwdotorg.org>
        Perlfaq4: pad a string with blanks <hartleh1@westat.com>
    Re: PWS and Perl paul_rahe@cissc.canon.com
    Re: Running a CGI script without change the brower?? <edatwork@REMSPAMinternethut.com>
    Re: running a file from unix shell <gary@rdss.com>
    Re: Ten Tips toward *DIVERSITY COMPLIANCE* in Web Desig (Benjamin Franz)
    Re: Ten Tips toward *DIVERSITY COMPLIANCE* in Web Desig <tchrist@mox.perl.com>
    Re: Ten Tips toward *DIVERSITY COMPLIANCE* in Web Desig <tchrist@mox.perl.com>
    Re: Ten Tips toward *DIVERSITY COMPLIANCE* in Web Desig (Charles R. Thompson)
        test <frederic@tavern.xsj.xilinx>
    Re: The docs as talking books (was Re: newbie with a "h (David H. Adler)
    Re: This code just wont run. Any ideas? <flavell@mail.cern.ch>
    Re: why won't this cgi script work? <aqumsieh@matrox.com>
    Re: Win32 system problem and quotes <swarren@www.wwwdotorg.org>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Tue, 11 May 1999 20:43:45 +0100
From: "Carol Herbert" <carol@herb4.freeserve.co.uk>
Subject: Anyone willing to spare a shoulder ?
Message-Id: <7ha1dc$v57$1@news4.svr.pol.co.uk>

I've just discovered I have bought the wrong book for learning perl :(

I have got Learning Perl - instead of Learning Perl for Win 32 Systems.

Is there any kind soul out there that is familiar with running perl on both
UNIX and pc systems, who would be willing to answer the occassional email
question from me when I come across a translation problem ?

I promise that I will only contact you in extreme emergencies - and not fill
your email tray with inane drivel.

A sample question would be :

Using Dos to check perl programmes : when entering a list of strings, the
command to finish on UNIX is CTRL+D.  Other systems states CTRL+Z - but
neither of these work.  Is there a different command for DOS ?

Any help would be humbly and gratefully received.

Carol@herb4.freeserve.co.uk





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

Date: Tue, 11 May 1999 19:51:20 GMT
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: Anyone willing to spare a shoulder ?
Message-Id: <YS%Z2.229$6x6.92@news.rdc1.sfba.home.com>

Carol Herbert <carol@herb4.freeserve.co.uk> wrote in message
news:7ha1dc$v57$1@news4.svr.pol.co.uk...
> Using Dos to check perl programmes : when entering a list of strings, the
> command to finish on UNIX is CTRL+D.  Other systems states CTRL+Z - but
> neither of these work.  Is there a different command for DOS ?

Did you try typing CTRL-D, then return? Assuming that you mean entering a
list of strings by typing...

--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com                http://www.techhouse.com/
mailto:swarren@wwwdotorg.org                http://www.wwwdotorg.org/
              MIME, S/MIME and HTML mail are acceptable





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

Date: Tue, 11 May 1999 19:38:20 GMT
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: Bug in Perl 5.005_03 for win32 on NT machine ??
Message-Id: <MG%Z2.228$6x6.131@news.rdc1.sfba.home.com>

Larry Rosler <lr@hpl.hp.com> wrote in message
news:MPG.11a1f543d6ef8017989a2b@nntp.hpl.hp.com...
> [Posted and a courtesy copy sent.]
>
> In article <37384EB5.486AB2C5@itb.biologie.hu-berlin.de> on Tue, 11 May
> 1999 17:37:26 +0200, a_kowald <axel@itb.biologie.hu-berlin.de> says...
> > I just installed Perl 5.005_03 for win32 on my NT4 machine and when I
> > use "read()" to read a binary file perl only reads the first 511 bytes.
> > For instance: $tmp=read(FP,"file.bin",1000) results in $tmp being 511
> >
> > Is this a bug, a feature or what am I doing wrong ?
> > Btw, the same perl script runs fine under unix.
>
> Did you remember to use binmode() immediately after opening the file?
> Probably the 511th character in the file is Control-Z, which is being
> interpreted as end-of-file.

Similarly, CR/LF conversion might do odd things.

That said, binmode won't solve everything - it's quite valid for read() to
give you back fewer bytes than you asked for, although since you seem to be
grabbing the read() result (and hopefully checking it!) I guess you know
that anyway.

> How many person-years have been wasted by this damned ancient
> boondoggle?

It's just more fun when writing cross-platform scripts;-) It has to be the
One True Way, what with CP/M having done it this way and all;-)

--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com                http://www.techhouse.com/
mailto:swarren@wwwdotorg.org                http://www.wwwdotorg.org/
              MIME, S/MIME and HTML mail are acceptable





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

Date: Tue, 11 May 1999 19:25:27 GMT
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: Build Problem
Message-Id: <Hu%Z2.226$6x6.101@news.rdc1.sfba.home.com>

MVansic967 <mvansic967@aol.com> wrote in message
news:19990511102204.04899.00000920@ng-cg1.aol.com...
> I am having a problem building Perl5.005_03 on my HP-UX 10.01 system.  I
get
> the following message during the make test (actually ./perl harness):
>
> /usr/lib/dld.sl: Unresolved symbol: _dbm_open (code) from
/usr/lib/libdbm.1

I'm not familiar with HP-UX, and the error doesn't quite match the Solaris
error that the following explanation is for, but this might help you:

In Solaris, there's and environment variable $LD_LIBRARY_PATH that tells the
dynamic linker where to find all shared-libraries (e.g. libgdm.so.n, n=some
number). Like $PATH, it's a : separated list of paths that might be:

/usr/local/lib:/opt/product1/lib
etc.

However, since your message indicates that _dbm_open couldn't be found
*from* libdbm, I'm not quite sure I'm correct.

Are you sure that
a) dbm is correctly compiled/installed
b) you gave the correct arguments to Perl's configure

Hope this helps...

--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com                http://www.techhouse.com/
mailto:swarren@wwwdotorg.org                http://www.wwwdotorg.org/
              MIME, S/MIME and HTML mail are acceptable





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

Date: Tue, 11 May 1999 15:57:36 -0400
From: Ed Eddington <edatwork@REMSPAMinternethut.com>
Subject: CPAN shell with Win95 - HOW???
Message-Id: <37388BB0.D219EA02@REMSPAMinternethut.com>

I can't seem to get CPAN shell working with ActivePerl for Win95. Do
they just assume that we have 'tar', etc. on a Win95 machine?? Anyone
been through this before? If you have, please let me know what I need to
do here. Any help is greatly appreciated. See below...

Thanks,
Ed



CPAN shell with Win95
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

CPAN shell requires things like 'tar', 'gzip' and 'make' which obviously
do not come with Win95. I downloaded CYGWIN to get these utilities so
that I could use CPAN. (Hmmm. Can someone tell me why this should be
necessary? Why include CPAN in the Win95 Perl distribution knowing the
fiasco needed to enable it!?!? I digress.) I installed them to my D:
drive (C is full).

Managed to get CPAN shell to use my new 'tar', 'gzip' and 'make', and
they seem to work - EXCEPT, my problem is that every "install" from the
CPAN shell gets hung up on 'make' with the following error:

(Output of "install Some::module")
 ....
Checking if your kit is complete...
Looks good
Usage: xsubpp [-v] [-C++] [-except] [-prototypes] [-noversioncheck]
[-nolinenum
ers] [-s pattern] [-typemap typemap]... file.xs
Writing Makefile for IO
Makefile:775: *** missing separator.  Stop.
  D:\Progra~1\cygnus\cygwin~1\H-i586~1\bin\make.exe  -- NOT OK
Running make test
  Oops, make had returned bad status
 ....

So, I still don't have any success using CPAN shell to install packages. 

Another big aggrevation is the lack of a scroll bar in the MS-DOS
window. I found that PPM has the ability to "set more 20" for a prompt
every 20 lines, but this doesn't work during and 'install'. There seems
to be nothing similar for CPAN shell.

Had trouble getting PPM working through firewall as well, but I got that
working.

Any hints getting CPAN working with CYGWIN's 'make' would be greatly
appreciated.

Thank you!!!
Ed Eddington


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

Date: Tue, 11 May 1999 13:17:18 -0500
From: Yang Chao <yangc@ra.comm.mot.com>
Subject: Re: How process a file?
Message-Id: <3738742E.54CC377@ra.comm.mot.com>

This is a multi-part message in MIME format.
--------------07AD794F1C88B34719D5FF82
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

dtillaud@hotmail.com wrote:

> hello
>
> I'd like to open a file and to check if a string is into this file.
> I do as bellow :
>
>    $EverPlay=0;
>    $Buffer=$NameP;
>    $Buffer.=' ';
>    $Buffer.=$SurnameP;
>    open(FILE,"<file.txt");
>    while(<FILE>)
>    {
>       $Line = <FILE>;
>       if($Line =~ /$Buffer/)
>       {
>          $EverPlay=1;
>       }
>    }
>    close (FILE);
>
> The problem is that Everplay becomes true only if the string is twice inside.
> Please help!!
>
> David
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

Hi,

  try this when you open the file:

  open(FILE, "file.txt")

   If you want the while file, they're attached.

   Cheers!



--------------07AD794F1C88B34719D5FF82
Content-Type: text/plain; charset=us-ascii;
 name="file.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="file.txt"

Time is good, weather is good,
let's play volleyball.

yang chao is good.

--------------07AD794F1C88B34719D5FF82
Content-Type: text/plain; charset=us-ascii;
 name="lab5.01"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="lab5.01"

   $EverPlay = 0; 
   $Buffer='yang';
   $Buffer.=' ';
   $Buffer.='chao';
   open(FILE,"file.txt");
   while(<FILE>)
   {
      $Line = <FILE>;
      if($Line =~ /$Buffer/)
      {
         $EverPlay=1;
         print "find the person\n";
      }
   }
   close (FILE);

--------------07AD794F1C88B34719D5FF82--



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

Date: Tue, 11 May 1999 12:44:38 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How process a file?
Message-Id: <MPG.11a2287bf743ffb3989a2e@nntp.hpl.hp.com>

In article <3738742E.54CC377@ra.comm.mot.com> on Tue, 11 May 1999 
13:17:18 -0500, Yang Chao <yangc@ra.comm.mot.com> says...
> dtillaud@hotmail.com wrote:
 ...
> > The problem is that Everplay becomes true only if the string is twice inside.
 ... 
> yang chao is good.

Not so good.  You have repeated the error, not corrected it.  As several 
others have already pointed out, two lines of input are being read on 
every iteration of the loop.

 ...

>    while(<FILE>)
>    {
>       $Line = <FILE>;
>       if($Line =~ /$Buffer/)
>       {
>          $EverPlay=1;
>          print "find the person\n";
>       }
>    }

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Tue, 11 May 1999 19:17:17 GMT
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: how to test if a directory exist?
Message-Id: <1n%Z2.225$6x6.94@news.rdc1.sfba.home.com>

Christoph Schmitz <cschmitz@stud.informatik.uni-trier.de> wrote in message
news:7h944n$112$1@fu-berlin.de...
> if ( -d /etc ) {
> do_something();
> }

do_something() if -d '/etc' ;

:-)

--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com                http://www.techhouse.com/
mailto:swarren@wwwdotorg.org                http://www.wwwdotorg.org/
              MIME, S/MIME and HTML mail are acceptable





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

Date: 11 May 1999 18:59:59 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Learning Perl - help, please !
Message-Id: <slrn7jgvmd.fpj.fl_aggie@stat.fsu.edu>

On Tue, 11 May 1999 19:17:23 +0100, Carol Herbert
<carol@herb4.freeserve.co.uk>, in <7h9sbp$b5e$1@news7.svr.pol.co.uk> wrote:

+ I am ending the input of the string with ctrl+z (as recommended) - should I
+ be ending with something else ?

I saw here not-so-long ago that one iteration under DOS was control-Z followed
by a return. I'm just repeating what I read...

James


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

Date: Tue, 11 May 1999 19:31:44 GMT
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: newbie need help - Windows vs Linux
Message-Id: <AA%Z2.227$6x6.153@news.rdc1.sfba.home.com>

IceLava) <bloodstorm@rocketmail.com> wrote in message
news:7h9ibp$b5u$1@dove.qut.edu.au...
> I recently download the latest ActivePerl & am running it wif Apache in
> Win98.  it seems to work juz like in Linux except for 1 thing i
discovered -
> using the system command 'date' will cause General failure for device
> LP!!!, watever that is..... has anybody experienced such a prob in
Windows?
> i'm new to Perl & Apache, & I can't seem to find any helpful info in the
> docs that can rectify this prob.

date does different things under Unix v.s. Win32.

Unix: Prints the current date to stdout
Win32: Prints date & prompt, then waits for new date to be entered

I've no idea quite what device LP would have to do with it...

Hence, shelling out to standard Win32 date probably isn't something you want
to do.

Have you tried the following instead?:

--- cut
#!/usr/bin/perl -w
use strict ;
print localtime() . "\n" ;
--- cut

--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com                http://www.techhouse.com/
mailto:swarren@wwwdotorg.org                http://www.wwwdotorg.org/
              MIME, S/MIME and HTML mail are acceptable





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

Date: Tue, 11 May 1999 15:31:09 -0400
From: Henry Hartley <hartleh1@westat.com>
Subject: Perlfaq4: pad a string with blanks
Message-Id: <3738857D.24C8EE87@westat.com>

In perlfaq4 the question "How do I pad a string with blanks or pad a
number with zeroes?" has the following two examples:

    # Left padding with blank:
    $padded = sprintf( "%${pad_len}s", $text ) ;

    # Right padding with blank:
    $padded = sprintf( "%${pad_len}s", $text ) ;

To me they look identical (and they both left pad with blank).
Shouldn't the second one read?:

    # Right padding with blank:
    $padded = sprintf( "%-${pad_len}s", $text ) ;

Note the minus sign between the % and the $.  If this has been
discussed, please ignore my post.  Thanks.

Henry Hartley





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

Date: Tue, 11 May 1999 19:30:04 GMT
From: paul_rahe@cissc.canon.com
Subject: Re: PWS and Perl
Message-Id: <373884d1.18659480@news.canon.com>

On Tue, 11 May 1999 16:42:15 +0200, "R!k" <rusenet@bigfoot.com> wrote:

>How can I use Perl scripts with Personal Web Server?
>
>Rik
>
>

1) Download the Perl interpreter from ActiveState
(www.activestate.com)

2) Place your Perl scripts in the <drive>:\inetpub\wwwroot\cgi-bin
folder

Paul


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

Date: Tue, 11 May 1999 15:39:14 -0400
From: Ed Eddington <edatwork@REMSPAMinternethut.com>
Subject: Re: Running a CGI script without change the brower??
Message-Id: <37388762.E6A56949@REMSPAMinternethut.com>



> I have seen something about the
> status code "204". Can anyone help how to do the in a perl scipt?

Instead of printing the usual Content-type header for HTML:

 print "Content-type: text/html\n\n"

Try this:

 print "Content-type: text/plain\n";
 print "Status: 204 No Response\n\n";
 print "You should only see this message if your browser does";
 print "not support the status code 204\n";



Good luck!
Ed


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

Date: Tue, 11 May 1999 15:53:57 -0400
From: Gary Ebert <gary@rdss.com>
Subject: Re: running a file from unix shell
Message-Id: <37388AD0.C35CF702@rdss.com>

Ron Reidy wrote:
> 
> mikej wrote:
> 
> > Hi,
> >
> > Im trying to run a file called "Configure" from a unix shell. The file
> > has full execute permissions and when I am in the same direcory as the
> > file I type:
> >
> > ../Configure
> 
> This will run Configure from the parent directory.  Is this what you want
> or do you mean "./Configure"?
> 
> >
> >
> > from the command line. Then it tells me ./Configure: not found
> >
> > it will say the same thing if I just type:
> >
> > Configure
> >
> > About a few months ago we had to reinstall our unix system. Before the
> > reinstall i could run anything i wanted from the command line (perl
> > scripts and things), but now it keeps saying "not found". Am I missing
> > something here?
> >
> > -mike
> >
> >

It sounds to me like either perl is not in the same place as it was before the
(re)install or perl was not included in the distribution that was
(re)installed.  

Take a look at the first line of the script and verify that the perl
executable is there.  

e.g.
if the first line reads:
#!/usr/local/bin/perl 
and you do
sh_prompt> /bin/ls /usr/local/bin/perl
and get the following in return
/usr/local/bin/perl not found
This means that either perl is not on your computer or that it is in a
different place.

To see if it exists on your system at all 
sh_prompt> cd /
sh_prompt> find . -name perl

If perl is found then change the first line of the script to reflect the
correct location (or make a symbolic link to the correct location from the
location in the script, or copy it to the correct location (not
recommended!!!!) or whatever).

If perl is not found then download a copy for your operating system (or the
source) and install (and/or compile) it.

			Good Luck,
				Gary
-- 
Gary Ebert                                 Operations Administrator
Voice:     (301) 428-2115                  Comtech Mobile Datacom Corporation
Fax:       (301) 428-1004                  19540 Amaranth Drive
Pager:     (800) 777-4681   PIN: 3981842   Germantown, MD  20875-2126


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

Date: Tue, 11 May 1999 19:04:18 GMT
From: snowhare@long-lake.nihongo.org (Benjamin Franz)
Subject: Re: Ten Tips toward *DIVERSITY COMPLIANCE* in Web Design
Message-Id: <Sa%Z2.20938$ny.1333283@typhoon-sf.snfc21.pbi.net>

In article <MPG.11a242351237d5fb989695@news>,
Charles R. Thompson <design@raincloud-studios.com> wrote:
>[This followup was posted to comp.lang.perl.misc and a copy was sent to 
>the cited author.]
>
>In article <3738734D.A631158B@mediaone.net>, PropART says...
>> but still implies
>> that you shouldn't use JavaScript or any animation technology...
>
>I say Bully. IMO, JavaScript only has two valid uses which are 
>'workaroundable' anyway.
>

This is like saying 'Perl only has two valid uses: Report generation
and data reduction'.

JavaScript has many problems in cross-platform compatibility, but it's
by no means restricted to 'two valid uses'. For example, I use it in
an application where I have 14 series of data that may need to be
'shifted' one place left or right for the user. The page the form
is in is OVER 300 K net (yes, its a monster. A matter of necessity
for its application.) Using CGI around the loop to shift the data
one place in the form fields takes an unreasonable amount of time.
JavaScript does it in a second or so on request.

-- 
Benjamin Franz


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

Date: 11 May 1999 13:07:36 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Ten Tips toward *DIVERSITY COMPLIANCE* in Web Design
Message-Id: <37387ff8@cs.colorado.edu>

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

In comp.lang.perl.misc, 
    "J|rgen Exner" <juex@my-dejanews.com> writes:
:Somehow I fail to see the relation with Perl.
:Do you mind to explain?

It's in my followup -- a perl-based proxy to fix a lot
of this totally evil crap.

--tom
-- 
Fungus doesn't take a vacation.  --Rob Pike


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

Date: 11 May 1999 13:17:31 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Ten Tips toward *DIVERSITY COMPLIANCE* in Web Design
Message-Id: <3738824b@cs.colorado.edu>

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

In comp.lang.perl.misc, "Alan J. Flavell" <flavell@mail.cern.ch> writes:
:With respect, Sir, your rant, which I substantially support, was
:way off topic for this group.  

It was a straight-line setup to post the punchline: the proxy filter.

--tom
-- 
When I was a boy I was told that anybody could become President.  Now
I'm beginning to believe it.
                --Clarence Darrow


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

Date: Tue, 11 May 1999 19:31:05 GMT
From: design@raincloud-studios.com (Charles R. Thompson)
Subject: Re: Ten Tips toward *DIVERSITY COMPLIANCE* in Web Design
Message-Id: <MPG.11a250cb6057b2bc989696@news>

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

In article <Sa%Z2.20938$ny.1333283@typhoon-sf.snfc21.pbi.net>, Benjamin 
Franz says...
> This is like saying 'Perl only has two valid uses: Report generation
> and data reduction'.

no. It's exactly like saying trusting JavaScript to pre-supply your error 
checking is a totally nearsighted and dangerous concept. I am talking 
about compatibility and fallbacks here.

I said that you should *still* error check in your script which *no one* 
from this NG with an inkling of understanding would argue against.

Further, the citing of rollovers illustrates a potential problem which is 
overcome due to the fallback nature of JavaScript in that particular 
area. If you are performing calculations on the client side, you are not 
being 'Diversly Compliant' by any stretch of the imagination... except in 
Uncle Bill's head.
 
> JavaScript has many problems in cross-platform compatibility, but it's
> by no means restricted to 'two valid uses'. For example, I use it in
> an application where I have 14 series of data that may need to be
> 'shifted' one place left or right for the user.

JavaScript *is* restricted due to cross-platform compatibility. As you 
very well point out above and below, you completely missed the following 
points from the threads...

1) download time. Even with my blistering connection here, I wouldn't 
touch that bloated page.

2) non-javascript users. My previous example illustrates that there 
should be fallbacks to any client side driven solution on the server. If 
you aren't doing that, you are opening your script's weaknesses 
(possibly security issues) and quite possibly ruining someone's visit to 
your site.

> The page the form
> is in is OVER 300 K net (yes, its a monster. A matter of necessity
> for its application.) 

What a waste. I hope you don't pay for your bandwidth usage.

> Using CGI around the loop to shift the data
> one place in the form fields takes an unreasonable amount of time.

I would say it would take about forever + 1/2  since CGI can't do that in 
the first place. The *language* you script in does. I'll even up the ante 
by declaring that more than 10 people in the NG could match if not beat 
your 'shift code' times in Perl. Your solution doesn't really gain 
anything since the CGI bottleneck will effect whatever the heck you send 
it anyway.

> JavaScript does it in a second or so on request.

Heh.. that's all great and wunnerful and all that, but what happens when 
a user without JavaScript hits your page? 

You have lost part of your visitors due to download time
You have lost another part due to no fallbacks

The sig says it all.

-- 
Charles R. Thompson
RainCloud Studios
"That? That's no script. That's your attempt at a rather complex README 
file."


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

Date: 11 May 1999 11:27:56 -0700
From: Frederic Rivoallon <frederic@tavern.xsj.xilinx>
Subject: test
Message-Id: <xh1yaivihqr.fsf@tavern.xsj.xilinx>

This is a test ` h { ------


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

Date: 11 May 1999 15:08:42 -0400
From: dha@panix.com (David H. Adler)
Subject: Re: The docs as talking books (was Re: newbie with a "howto" question)
Message-Id: <slrn7jh01p.lig.dha@panix.com>

On Mon, 3 May 1999 12:39:41 -0400 , Ala Qumsieh <aqumsieh@matrox.com> wrote:
>
>Jonathan Stowe <gellyfish@gellyfish.com> writes:
>
>> One area where some feedback would be useful is as to who's voice should be
>> used - Mrs Gellyfish is dead set on that of Sir Anthony Hopkins but I think
>> that might be national bias on her part.  Suggestions ?
>
>There is no question about it in my mind. The man with the Force. The
>Darth himself.
>
>		"James Earl Jones"

"THIS - is P5P..."

-- 
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
All hail El Cabeza Del Oro!


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

Date: Tue, 11 May 1999 21:07:22 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: This code just wont run. Any ideas?
Message-Id: <Pine.HPP.3.95a.990511210100.23884F-100000@hpplus01.cern.ch>

On Tue, 11 May 1999, Roger Liu caused this to be extruded onto usenet:

 Parts/attachments:
    1 Shown    6 lines  Text
    2   OK    12 lines  Text, "Card for Roger Liu"
 ----------------------------------------

Please don't do that[1]

> > $to = "daniel.vesma@thewebtree.com";
>                    ^^^^^^^
> 
> Change @ to \@

Why was that string in " " in the first place?  There's nothing
that needs interploating.


[1] Vendors have evidently decided on an unpleasant plot to wreck the
carefully peer-reviewed usenet conventions by enlisting innocent
newcomers to propagate their deviant formats.  Please help to fight 
the rot.  The netiquette is at news.announce.newusers



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

Date: Tue, 11 May 1999 14:48:19 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: why won't this cgi script work?
Message-Id: <x3y675zphn0.fsf@tigre.matrox.com>


bart.lateur@skynet.be (Bart Lateur) writes:

> Ala Qumsieh wrote:
> 
> >Maybe perhaps he needs a chomp() there.
> 
> Well...
> >open(COUNT, "> count.dat");
> >$count += 1;
> >print COUNT "$count";
> >close (COUNT);
> 
> I don't think so. There's no newline there. And even it there were, it
> would still work. It would give a warning when run using -w, though.

True. Actually, I didn't mean to say that the chomp() is what's
missing and that it will make the script work (but I think it seemed
so, when I look back at it). I just wanted to point out that chomp()
would be a good idea there, just in case.

Ala



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

Date: Tue, 11 May 1999 19:13:43 GMT
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: Win32 system problem and quotes
Message-Id: <Hj%Z2.224$6x6.128@news.rdc1.sfba.home.com>

Jeremy Gurney <c4jgurney@my-dejanews.com> wrote in message
news:7h93r9$qc6$1@nnrp1.deja.com...
> In article <7h90s0$o82$1@nnrp1.deja.com>,
>   alexmc@my-dejanews.com wrote:
> > I have a problem which may be a bug in the ActiveState Win32 perl
> > build 515. (I am running NT4, sp3)
>
> > $cmd = "\"ls\" \"c:\\program files\" ";
> > system $cmd;                          # DOESN'T Work
>
> I tried
> $cmd = 'dir "c:\program files"';
> with no problems at all.

BUT: The original poster said (quotes modified, but makes no semantic
difference):

$cmd = '"ls" "c:\program files"';
         ^^
        ^  ^
Likewise,

Matti Johannes Kdrki <makarki.NOSPAM@news.hit.fi> wrote in message
news:7h963k$sah$1@news.hit.fi...
> alexmc@my-dejanews.com wrote:
>
>
> : $cmd = "\"ls\" \"c:\\program files\" ";
> : system $cmd;                          # DOESN'T Work
> : print "This completed ($cmd) \n";
>
> This doesn't work because if you put quotes around the whole command
> including parameters. The system function of the OS (NT or Win95) thinks
> that the quoted text is only a name of the executable with some spaces in
> it. ie the system tries to start the executable named as:
>
>   "ls c:\program files"

But that isn't what the original poster did either - the quotes were only
around either the command only, the parameter only or both the command and
parameter *individually*.

Unfortunately, I can't actually be much use in suggesting what's wrong
here... The original script, modified for my path names, works on my system:

---cut
#!/usr/bin/perl -w

# Useful for error catching
use strict ;

# So we get correct inter-mingling of command and Perl output
# (hot pipes)
select STDERR ;
$| = 1 ;
select STDOUT ;
$| = 1 ;

my $cmd ;

$cmd = "ls \"d:\\program files\" ";
system $cmd;                         # Works
print "This completed ($cmd) \n";
print "\n\n\n\n\n" ;

$cmd = "\"ls\" d:\\archive ";
system $cmd;                          # Works
print "This completed ($cmd) \n";
print "\n\n\n\n\n" ;

$cmd = "\"ls\" \"d:\\program files\" ";
system $cmd;                          # DOESN'T Work
print "This completed ($cmd) \n";
--- cut

But then, I'm running Windows98.

Where did you get ls? This doesn't come with Windows by standard. Perhaps
your problem is really with ls and not with Perl. What makes you think it
doesn't work (i.e. what error is occuring, or what invalid output is
generated?)

Note that my ls came from cygwin32 beta20.1, so maybe try that out and see
if it helps.

--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com                http://www.techhouse.com/
mailto:swarren@wwwdotorg.org                http://www.wwwdotorg.org/
              MIME, S/MIME and HTML mail are acceptable





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

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 5631
**************************************

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