[22645] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4866 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 20 03:05:39 2003

Date: Sun, 20 Apr 2003 00:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 20 Apr 2003     Volume: 10 Number: 4866

Today's topics:
    Re: design considerations for using DB_File tie hashes  <me@privacy.net>
        Environment Varibles <argonhigh@hotmail.com>
    Re: Environment Varibles <argonhigh@hotmail.com>
    Re: Environment Varibles <Juha.Laiho@iki.fi>
    Re: Environment Varibles (Tad McClellan)
    Re: Environment Varibles <News@LearnQuick.Com>
    Re: Flushing output? <mikeother@comcast.net>
    Re: Flushing output? (Joe Smith)
    Re: foreach how do I get out of the loop? sthg like "br (Tad McClellan)
    Re: Help needed understanding bitwise operations (Joe Smith)
    Re: HTML::Template question (Joe Smith)
    Re: Need advice on my first Perl script <bob@aol.com>
    Re: Need advice on my first Perl script <wcitoan@NOSPAM-yahoo.com>
    Re: newbie lib dir question (Joe Smith)
    Re: Number of List Items <flavell@mail.cern.ch>
        programmer survey <scs12@psu.edu>
    Re: programmer survey <abigail@abigail.nl>
    Re: programmer survey <rogersc@mindspring.com>
    Re: programmer survey <abigail@abigail.nl>
    Re: Smart searching <kasp@epatra.com>
    Re: Unlink Not Working On Windows Server <geo@divergentweb.NO.SPAM.com>
    Re: Unlink Not Working On Windows Server <geo@divergentweb.NO.SPAM.com>
    Re: Unlink Not Working On Windows Server <jurgenex@hotmail.com>
    Re: Unlink Not Working On Windows Server <jurgenex@hotmail.com>
        Won't let me use $[ !!! <jaspax@u.washington.edu>
    Re: Won't let me use $[ !!! (Tad McClellan)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 20 Apr 2003 02:21:36 +0200
From: Norbert Schmidt <me@privacy.net>
Subject: Re: design considerations for using DB_File tie hashes ???
Message-Id: <1kxsv8mcci0v$.z1chksotqcia$.dlg@40tude.net>

Hello Dan,

> hi folks... I'm in the preliminary stages of designing a membership
> management system that will be driven with a html based interface and
> wanted to get some high-level pros and cons and does and donts with
> regard to methods for storing the data.

> Its looking like the DB_File module in combination with tie-ing to
> hashes is a pretty cool way to get a reasonably fast and lightweight
> "fake" database as long as the data lends itself to indexed tables.

I had something similar. That's what I did at first. But it all depends on
how the data will be used.

If most access will be reading quasi static data, then it could be a good
idea to create ordinary HTML pages whenever some data is uploaded or build
some caching machanism into the CGI that first checks if it could use an
already formatted page.

You should always split your data according to update frequency. It's a
waste of time if you always have to save a giant record when you just
incremented a reference counter.

When heavy usage hit the fan, I noticed that the worst delays came from the
time for the repeated opening and closing of the DB files. 

The solution-also to the locking problem-was to write a simple dedicated
deamon that is the single authority for this DB file and keeps it open all
the time. This deamon can also be written in Perl. IPC (I tried several
ways) works best via TCP/IP (even on Windows). For the client side (CGI)
you can write some simple TIE that hides the details of the IPC behind a
hash. (It's really easy: see perltie!) 


> - access speed for maybe up to 100k-500k records.

That much data for each record?
Then it's probably faster and safer if you stored each record in a simple
file and just keep the file name as reference.


> - portability of application source and (hopefully) datafiles between
> *nix and win32 PC development platforms.

Source is no problem. The problem may be with the DB_File module. Last time
I looked, that module isn't shipped with ActiveState Perl for Win32. You'ld
have to get it yourself and compile it.


> - how "stable" is the tied hash going to be ? its especially scarey to
> me in that it is not man-readable, and any corruption would be
> impossible to recover from.

Quite stable. Just don't allow two applictions write access at the same
time ...


> - does the DB_File version of tie handle all the flock-ing issues
> behind the curtain? 

AFAIK: No.

It's better to use the deamon approach. Then the "locking" will be implicit
by the way TCP/IP request are queued and processed with a single threaded
server process.


Regards, Norbert


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

Date: Sat, 19 Apr 2003 23:02:10 -0500
From: "James" <argonhigh@hotmail.com>
Subject: Environment Varibles
Message-Id: <Q4ooa.6261$f34.1088196@news20.bellglobal.com>

Is it posible to set environment varibles so that programs launched with ``,
or system() can access them?

I read threw perlfaq8, but it didn't anwser my question.
I am guessing this is basically a OS specific thing, right?




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

Date: Sun, 20 Apr 2003 00:04:32 -0500
From: "James" <argonhigh@hotmail.com>
Subject: Re: Environment Varibles
Message-Id: <n%ooa.6286$f34.1096563@news20.bellglobal.com>

"James" <argonhigh@hotmail.com> wrote in message
news:Q4ooa.6261$f34.1088196@news20.bellglobal.com...
> Is it posible to set environment varibles so that programs launched with
``,
> or system() can access them?
>
> I read threw perlfaq8, but it didn't anwser my question.
> I am guessing this is basically a OS specific thing, right?


Nevermind, I did a little more reading, and figured out my problem.




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

Date: Sun, 20 Apr 2003 04:57:01 GMT
From: Juha Laiho <Juha.Laiho@iki.fi>
Subject: Re: Environment Varibles
Message-Id: <b7t92q$cbf$1@ichaos.ichaos-int>

"James" <argonhigh@hotmail.com> said:
>Is it posible to set environment varibles so that programs launched with ``,
>or system() can access them?
>
>I read threw perlfaq8, but it didn't anwser my question.
>I am guessing this is basically a OS specific thing, right?

Don't know about non-Unix platforms, but within Unix (incl. Linux)
environments, child processes inherit the environment from the
parent (unless the parent explicitly overrides the child environment).

So, just modify the environment within perl before invoking the child,
as in:

$ENV{'foo'}='bar';
system('echo Foo: $foo');

-- 
Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
         PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)


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

Date: Sun, 20 Apr 2003 01:00:53 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Environment Varibles
Message-Id: <slrnba4dsl.cnb.tadmc@magna.augustmail.com>

James <argonhigh@hotmail.com> wrote:

> Is it posible to set environment varibles so that programs launched with ``,
> or system() can access them?


Yes.


> I read threw perlfaq8, but it didn't anwser my question.


Yes it did. You probably just didn't recognize it when you saw it:

   Changes to a process are not reflected in its parent--only in 
   any children created after the change.

Backticks and system() are child processes to the Perl program
that launches them.


> I am guessing this is basically a OS specific thing, right?


No.

See the %ENV hash in perlvar.pod.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sun, 20 Apr 2003 06:12:01 GMT
From: "Herb Martin" <News@LearnQuick.Com>
Subject: Re: Environment Varibles
Message-Id: <RSqoa.108135$vI3.4393846@twister.austin.rr.com>

In Windows (where it sounded like he might be working)
there is a program called setx.exe (Resource Kit.)

One can also do it by modifying the registry.  Win32 Perl
has modules for registry access.

> > I am guessing this is basically a OS specific thing, right?
> No.

Sometimes.

Herb Martin
Try ADDS for great Weather too:
http://adds.aviationweather.noaa.gov/projects/adds






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

Date: Sat, 19 Apr 2003 18:07:14 -0400
From: "Michael L. Artz" <mikeother@comcast.net>
Subject: Re: Flushing output?
Message-Id: <21WdnaymSJ7XVjyjXTWcrg@comcast.com>

David Efflandt wrote:
> I suspect that process_files does not begin its processing until it
> receives the complete list of files to process. 

That was exactly it, thanks!  I had to delve into the C a little to take 
the newline out of fscanf(stdin, "%254\n", $filename), and now it works 
fine.

-Mike



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

Date: Sun, 20 Apr 2003 06:11:12 GMT
From: inwap@inwap.com (Joe Smith)
Subject: Re: Flushing output?
Message-Id: <4Sqoa.8259$io.297092@iad-read.news.verio.net>

In article <nZOdnRyL4P_r0TyjXTWcqw@comcast.com>,
Michael L. Artz <mikeother@comcast.net> wrote:
>open PIPE, "| process_files -";
>open FILELIST, "ls -tr |";
>my $filename
>while ($filename = <FILELIST>) {
>     print PIPE $filename;
>}

  close PIPE or warn "Problem sending output to process_files: !$\n";

>my $new_filename = $filename;
>$new_filename =~ s/foo/bar/;
>rename $filename, $new_filename;

Always be sure to explictly close any pipe you are writing to.
	-Joe
-- 
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.


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

Date: Sun, 20 Apr 2003 00:54:02 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: foreach how do I get out of the loop? sthg like "break;" exists?
Message-Id: <slrnba4dfq.cnb.tadmc@magna.augustmail.com>

milka <milka5000@yahoo.com> wrote:

> I didn't use foreach after all. 

> What
> I was looking for was
> 
> $title =~ s/8T8/\|/g;
> $image =~ s/8T8/\|/g;
> $comment =~ s/8T8/\|/g;


If you want to perform the same operation on several different
variables, that is a situation that suggests a loop:

   foreach ( $title, $image, $comment ) {
      s/8T8/\|/g;
   }

or

   s/8T8/\|/g foreach $title, $image, $comment;


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Sun, 20 Apr 2003 06:07:47 GMT
From: inwap@inwap.com (Joe Smith)
Subject: Re: Help needed understanding bitwise operations
Message-Id: <TOqoa.8258$io.297092@iad-read.news.verio.net>

In article <56t2avgcn9r9m0brhdrboiqun7d2q07f7q@4ax.com>,
Dark Over Lord  <scottjk@softhome.net> wrote:
>Now, assuming that I am right (I hope!) What about different lengths?
>
>Example:
>10110101
>1010

The first number is 00000000000000000010110101 on machines with 32-bit ints.
The second one is   00000000000000000000001010	"	"	"

>Are they right aligned or left? And would I have to pad them with 0s?

Align right, pad with zeros to the left.  Use vec() for longer bit strings.
	-Joe

-- 
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.


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

Date: Sun, 20 Apr 2003 06:20:29 GMT
From: inwap@inwap.com (Joe Smith)
Subject: Re: HTML::Template question
Message-Id: <N_qoa.8260$io.297092@iad-read.news.verio.net>

In article <51d7db68.0304181239.52a15f57@posting.google.com>,
Brent Middaugh <smiddaugh@telispire.com> wrote:
>I've verifed that the file main.tmpl is in the same directory as the
>script, so I'm not quite sure why that H::T can't find the file.

If you were running a web server based on the NCSA version (such as
Apache), then the script's directory would be significant.  But IIS
does not work that way.  You should either use absolute pathnames
for all files, or chdir() first.
	-Joe
-- 
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.


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

Date: Sun, 20 Apr 2003 01:46:40 GMT
From: Optional <bob@aol.com>
Subject: Re: Need advice on my first Perl script
Message-Id: <11u3avso0lmrak2mudnr7e4odkiamllu0p@4ax.com>

On Sat, 19 Apr 2003 15:50:57 -0000, "W. Citoan"
<wcitoan@NOSPAM-yahoo.com> wrote:

>Because "." means any character so if you wish to match a period only
>you must escape it.  The "$" at the end means end of expression so only
>match items ending in "tif".
>
>Yes, if you did "/[05].tif/" it will still match the desired files, but
>it will also match:
>
>  ...0atif
>  ...0.tifANDMORE
>
>Using "/[05]\.tif$/" is good defensive programming.  It ensures that
>only items names you expect are matched.  It prevents an accidental
>match to some other file.
>
>While you might not think it likely an unitentional match will occur,
>consider this:  sometime later, you (or someone else) comes along and
>decides to write some notes, calls it "NOTES5-tif.txt" for some reason
>or another, and puts it in that directory because it's convienent.  It
>may not be likely, but it could happen, so why not prevent it?
Right, had not considered other files/types exisiting in dir.
>
>- W. Citoan

Would ($file =~ /[05]\.tif\z/) be even better or is it considered the
same?  I read somewhere that \z meant absolutely ending with regex
while $ matches just before newline or to end of string.  I think this
was in reference to chomping STDIN, don't really recall.  



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

Date: Sun, 20 Apr 2003 02:26:44 -0000
From: "W. Citoan" <wcitoan@NOSPAM-yahoo.com>
Subject: Re: Need advice on my first Perl script
Message-Id: <slrnba41b1.3je.wcitoan@wcitoan-via.supernews.com>

On Sun, 20 Apr 2003 01:46:40 GMT, Optional wrote:
>  
>  Would ($file =~ /[05]\.tif\z/) be even better or is it considered the
>  same?  I read somewhere that \z meant absolutely ending with regex
>  while $ matches just before newline or to end of string.  I think
>  this was in reference to chomping STDIN, don't really recall.  

The "$" will match whether or not a newline is present (i.e. it ignores
newlines) while the "\z" will only match if there is no newline present
(i.e. doesn't ignore newlines).

If your filename has a newline on it, it will probably cause problems
with whatever you are trying to do with it.  However, I'd make sure I
chomp it vs using "\z" as I'd assume you really want to process it.
Also, "$" is more common usage so would be more recognized by others who
might need to look at your scripts.

- W. Citoan
-- 
Stanford women are responsible for the success of many Stanford men:
they give them "just one more reason" to stay in and study every night.


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

Date: Sun, 20 Apr 2003 06:41:56 GMT
From: inwap@inwap.com (Joe Smith)
Subject: Re: newbie lib dir question
Message-Id: <Uiroa.8261$io.297092@iad-read.news.verio.net>

In article <b7ob5s$745$1@lacerta.tiscalinet.it>,
Eddy <eddy@NOSPAMaxa.it> wrote:
>Well,
>
>If  I delete the old libs look what happens with apache:
>
>[root@www /]# mv /usr/lib/perl5 /usr/lib/00perl5

Ack! No.

	mv /usr/lib/perl5/5.00503 /usr/lib/perl5/unused-5.00503

You can remove or delete old version-specific subdirectories, but
not the main perl5 library directory.
	-Joe

-- 
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.


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

Date: Sat, 19 Apr 2003 23:58:28 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Number of List Items
Message-Id: <Pine.LNX.4.53.0304192356430.1845@lxplus005.cern.ch>

On Sat, Apr 19, pooba53 and MISSINGdelautenschTERMINATOR deposited
TOFU thus:

> Thanks for the information. Sorry to have annoyed you.

Nowadays most TOFU posters just go straight into the killfile.
You get the rare privilege of being told about it.

bye



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

Date: Sat, 19 Apr 2003 23:32:17 GMT
From: "Steve Shaffer" <scs12@psu.edu>
Subject: programmer survey
Message-Id: <50loa.10784$ot1.9377@nwrdny02.gnilink.net>

Hi.  I'm doing academic work for Penn State and have a brief survey for
professional programmers.  If you have 3 minutes to answer some simple
questions, I'd appreciate it.  The URL is:

http://www.ezwebsurveys.com/programmers.html

I apologize in advance if this is an inappropriate forum for this request.

Thanks!





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

Date: 20 Apr 2003 00:33:09 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: programmer survey
Message-Id: <slrnba3qm5.gd.abigail@alexandra.abigail.nl>

Steve Shaffer (scs12@psu.edu) wrote on MMMDXVIII September MCMXCIII in
<URL:news:50loa.10784$ot1.9377@nwrdny02.gnilink.net>:
@@  Hi.  I'm doing academic work for Penn State and have a brief survey for
@@  professional programmers.  If you have 3 minutes to answer some simple
@@  questions, I'd appreciate it.  The URL is:
@@  
@@  http://www.ezwebsurveys.com/programmers.html
@@  


And for those who don't know what to answer, a Perl program to help
them out:

#!/usr/bin/perl

use strict;
use warnings;

use WWW::Mechanize;

my $url   = "http://www.ezwebsurveys.com/programmers.html";

my $agent = WWW::Mechanize -> new ();

my $res = $agent -> get ($url);

unless ($res -> is_success) {
    die "Failed to fetch $url.\n", $res -> error_as_HTML, "\n";
}

$agent -> form (1) or die "Could not find a form.\n";

foreach my $input ($agent -> current_form -> inputs) {
    next if $input -> type eq 'submit';
    my @values = $input -> possible_values;
    $agent -> field ($input -> name, $values [rand @values]);
}

$res = $agent -> click;

unless ($res -> is_success) {
    die "Failed to fetch form.\n", $res -> error_as_HTML, "\n";
}

__END__


Abigail
-- 
perl  -e '$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
          for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
          print chr 0x$& and q
          qq}*excess********}'


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

Date: Sun, 20 Apr 2003 01:29:27 GMT
From: "Roger Schlafly" <rogersc@mindspring.com>
Subject: Re: programmer survey
Message-Id: <hKmoa.200$DJ4.109808661@twister1.starband.net>

"Abigail" <abigail@abigail.nl> wrote
> @@  http://www.ezwebsurveys.com/programmers.html
> And for those who don't know what to answer, a Perl program to help
> them out:

Thanks. I ran the script, and didn't get any output or feedback. But I
guess that if I had filled out the form manually, I may not have gotten
any either.




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

Date: 20 Apr 2003 02:03:28 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: programmer survey
Message-Id: <slrnba3vvg.gd.abigail@alexandra.abigail.nl>

Roger Schlafly (rogersc@mindspring.com) wrote on MMMDXIX September
MCMXCIII in <URL:news:hKmoa.200$DJ4.109808661@twister1.starband.net>:
||  "Abigail" <abigail@abigail.nl> wrote
|| > @@  http://www.ezwebsurveys.com/programmers.html
|| > And for those who don't know what to answer, a Perl program to help
|| > them out:
||  
||  Thanks. I ran the script, and didn't get any output or feedback. But I
||  guess that if I had filled out the form manually, I may not have gotten
||  any either.


No news is good news.



Abigail
-- 
perl -wlpe '}$_=$.;{' file  # Count the number of lines.


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

Date: Sun, 20 Apr 2003 11:42:04 +0530
From: "Kasp" <kasp@epatra.com>
Subject: Re: Smart searching
Message-Id: <b7te79$t3h$1@newsreader.mailgate.org>

I had worked on a project involving AltaVista search libraries. But they
have some licensing issue and I can't use them in my freelancing project. It
was pretty simple as I just specified the document and it handles, the
scoring, indexing and searching part.

I tried to look for some such perl module, but I couldn't find any. So I
just wondered if someone out here had used/done something like this before.
--
"Accept that some days you are the pigeon and some days the statue."
"A pat on the back is only a few inches from a kick in the butt." - Dilbert.




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

Date: Sun, 20 Apr 2003 02:01:44 -0400
From: "George" <geo@divergentweb.NO.SPAM.com>
Subject: Re: Unlink Not Working On Windows Server
Message-Id: <g8acnZSR_9dfqj-jXTWcoQ@comcast.com>

"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnb9qqr0.4n9.tadmc@magna.augustmail.com...
> George <geo@divergentweb.NO.SPAM.com> wrote:
>
> > unlink($delPath$filename);
>
>
> There is a syntax error there by the way...
>
> You could have found that by testing from the command line with:
>
>    perl -cw someprog.cgi
>
> You probably want one of these instead:
>
>    unlink( "$delPath$filename" ) or die ...
> or
>    unlink( "$delPath/$filename" ) or die ...
> or
>    unlink( $delPath . $filename ) or die ...
>
>
> --
>     Tad McClellan                          SGML consulting
>     tadmc@augustmail.com                   Perl programming
>     Fort Worth, Texas

As I mentioned in my original post I have tried "....die..."  including the
$! and it did not work. I do not have access to the command line so far as I
know (Telnet?). I tried the lines below one at a time and only got an HTTP
500 "Internal Server Error" :

unlink( "$delPath$filename" ) or die "could not unlink: $!";
unlink( "$delPath/$filename" ) or die "could not unlink: $!";
unlink( $delPath . $filename ) or die "could not unlink: $!";
unlink( "$delPath . $filename" ) or die "could not unlink: $!";

The path to the sample file I am trrying to unlink is
"/home/httpd/vhosts/thewebsite.com/httpdocs/datafiles/houseimages/".  The
path to the perl script is
"/home/httpd/vhosts/thewebsite.com/httpdocs/cgi-bin". Permissions are noted
below:

/home - unknown
/httpd - 755
/cgi-bin - 755
/datafiles - 755
/houseimages - 755
my perl script - 755


George Conklin
Divergent Web Design
geo AT divergentweb DOT com
"Insert witty quotation here."




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

Date: Sun, 20 Apr 2003 02:12:40 -0400
From: "George" <geo@divergentweb.NO.SPAM.com>
Subject: Re: Unlink Not Working On Windows Server
Message-Id: <E6ycnUQGCJHJpz-jXTWcrg@comcast.com>

"Philip Lees" <pjlees@ics.forthcomingevents.gr> wrote in message
news:3e9cff73.64636140@news.grnet.gr...
> On Tue, 15 Apr 2003 14:13:48 -0400, "George"
> <geo@divergentweb.NO.SPAM.com> wrote:
>
> >use CGI;
>
> It might be helpful to add this:
>
> use CGI::Carp qw/fatalsToBrowser/;
>
> >unlink($delPath$filename);
>
> And, as Tad said:
>
> unlink($delPath$filename)  or die "Can't delete $filename: $!;
>
> Phil
> --
> Ignore coming events if you wish to send me e-mail


Error message as follows:

=====================
Software error:
syntax error at deleteit.cgi line 20, near "unlink"
Execution of deleteit.cgi aborted due to compilation errors.

For help, please send mail to the webmaster (email@address.com), giving this
error message and the time and date of the error.
=====================

Does this mean the errors will be in the error logs or that I will need to
use the command line interface to et details?


-George Conklin
geoATdivergentwebDOTcom
"Insert witty quote here."




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

Date: Sun, 20 Apr 2003 06:15:35 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Unlink Not Working On Windows Server
Message-Id: <bWqoa.8255$yO5.728@nwrddc02.gnilink.net>

George wrote:
[Something about unlink]
> As I mentioned in my original post I have tried "....die..."
> including the $! and it did not work.

What did not work? The "die"? The "unlink"? The print? The error message?

"Does not work" is about the most useless description of a problem you can
possible write.

> I do not have access to the
> command line so far as I know (Telnet?).

Of course you have access to Perl from the command line. Or are you claiming
that your computer does not have a command line? I would find that hard to
believe.
Or are you claiming that your computer has no Perl installed? Then you are
trying to work with both your hands tied behind your back. Untie your hands
and life will be much easier.

> I tried the lines below one
> at a time and only got an HTTP 500 "Internal Server Error" :

Please see "perldoc -q 500"

jue




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

Date: Sun, 20 Apr 2003 06:20:15 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Unlink Not Working On Windows Server
Message-Id: <z_qoa.8257$yO5.5789@nwrddc02.gnilink.net>

George wrote:
> =====================
> Software error:
> syntax error at deleteit.cgi line 20, near "unlink"
> Execution of deleteit.cgi aborted due to compilation errors.

Syntax error? Really?
How is that possible? Didn't you check your program before uploading it the
web server?
If you insist on making your life difficult that's your choice. But then
don't cry for help.

> =====================
>
> Does this mean the errors will be in the error logs or that I will
> need to use the command line interface to et details?

Yes.

jue




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

Date: Sat, 19 Apr 2003 20:46:57 -0700
From: JS Bangs <jaspax@u.washington.edu>
Subject: Won't let me use $[ !!!
Message-Id: <Pine.A41.4.53.0304192042420.95442@dante18.u.washington.edu>

Hmph.

I have a great reason to use $[ in my script, and to set it to an
arbitrarily (and constantly changing) high value. It's cute and simple and
saves a ton of memory. I'm completely sure that this is how I want to go,
and I'm completely aware of the risks involved.

But Perl won't let me. Specifically, when I write the line "$[ = $i;", I
get a compiler error that says "That use of $[ is unsupported." Well. I
thought Perl was supposed to let the user do what he wants? Why this
sudden bit of fascism?

I'm quite curious what the justification is for this--

Jesse S. Bangs jaspax@u.washington.edu
http://students.washington.edu/jaspax/
http://students.washington.edu/jaspax/blog

Jesus asked them, "Who do you say that I am?"

And they answered, "You are the eschatological manifestation of the ground
of our being, the kerygma in which we find the ultimate meaning of our
interpersonal relationship."

And Jesus said, "What?"


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

Date: Sun, 20 Apr 2003 01:25:53 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Won't let me use $[ !!!
Message-Id: <slrnba4fbh.cnb.tadmc@magna.augustmail.com>

JS Bangs <jaspax@u.washington.edu> wrote:
> Hmph.
> 
> I have a great reason to use $[ in my script, and to set it to an
> arbitrarily (and constantly changing) high value. 


Changing when?

Between runs of the program?

Or changing during the running of the program?

If the later, then I don't know how to help you.


> It's cute and simple and
> saves a ton of memory. I'm completely sure that this is how I want to go,
> and I'm completely aware of the risks involved.
> 
> But Perl won't let me. 


It will if the index changes only between program runs:

   use constant i => 102;
or
   use constant i => $ARGV[0];
or
   my $i;
   BEGIN{ $i = 102 }
   use constant i => $i;

and then:

   $[ = i;


(which seems to disagree with the perldiag explanation...)


> Specifically, when I write the line "$[ = $i;", I
> get a compiler error that says "That use of $[ is unsupported." 


Did you look up that message in perldiag.pod?


> Why this
> sudden bit of fascism?


   This is to prevent the problem of one module changing the array 
   base out from under another module inadvertently.


> I'm quite curious what the justification is for this--


Where did you look to find out?


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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.

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 V10 Issue 4866
***************************************


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