[24703] in Perl-Users-Digest
Perl-Users Digest, Issue: 6860 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 12 11:05:58 2004
Date: Thu, 12 Aug 2004 08:05:08 -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 Thu, 12 Aug 2004 Volume: 10 Number: 6860
Today's topics:
Re: favorite perl IDE (Anno Siegel)
Re: How to remove a bunch of .log in windows <tore@aursand.no>
Re: LWP & Javascript <tadmc@augustmail.com>
Re: My own handy Pocket Reference notes (please share y <someone@example.com>
Re: nat table and perl problem (bjohnsme)
Re: News::Scan question <mr@sandman.net>
Re: Parsing html by XML::libXML <matrix_calling@yahoo.dot.com>
Re: Perl PDF modules - help please (Anno Siegel)
Re: Perl PDF modules - help please <tadmc@augustmail.com>
Re: Perl PDF modules - help please <eam@7ka.mipt.ru>
Re: Perl PDF modules - help please <noreply@gunnar.cc>
Re: Reset <> without having it fail once? (Hunter Johnson)
Re: Reset <> without having it fail once? (Hunter Johnson)
Re: Reset <> without having it fail once? <pinyaj@rpi.edu>
Re: Reset <> without having it fail once? (Greg Bacon)
Re: Returned mail is causing script to crash (Anno Siegel)
Re: Returned mail is causing script to crash <gnari@simnet.is>
Re: Returned mail is causing script to crash <nobull@mail.com>
Re: testing without shell access <twoheads@NOSPAMtiscali.co.uk>
Re: testing without shell access <1usa@llenroc.ude.invalid>
Re: testing without shell access <tadmc@augustmail.com>
Re: testing without shell access <tadmc@augustmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 12 Aug 2004 10:53:18 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: favorite perl IDE
Message-Id: <cffi6u$4c4$2@mamenchi.zrz.TU-Berlin.DE>
dragonbide <allen.jordan@colorado.edu> wrote in comp.lang.perl.misc:
> Hi. I'm looking for a good perl IDE. What are some of your
> favorites? (preferably for windows, but list whatever ones you'd
> like) .
Under Unix: vim plus Vi::QuickFix.
Anno
------------------------------
Date: Thu, 12 Aug 2004 15:15:21 +0200
From: Tore Aursand <tore@aursand.no>
Subject: Re: How to remove a bunch of .log in windows
Message-Id: <pan.2004.08.12.13.15.20.110932@aursand.no>
On Wed, 11 Aug 2004 08:51:35 -0700, Sarah wrote:
> I want to remove all the log files in c:\program files\log [...]
Don't try anything fancy. Go with 'File::Find::Rule';
#!/usr/bin/perl
#
use strict;
use warnings;
use File::Find::Rule;
my $dir = 'c:/';
my @log = File::Find::Rule->file()->name( '*.log' )->in( $dir );
foreach my $filename ( @log ) {
unlink( $filename );
}
Not tested, though.
--
Tore Aursand <tore@aursand.no>
"Life is pleasant. Death is peaceful. It's the transition that's
troublesome." (Isaac Asimov)
------------------------------
Date: Thu, 12 Aug 2004 08:52:13 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: LWP & Javascript
Message-Id: <slrnchmtgd.9ek.tadmc@magna.augustmail.com>
Perly <rosyling2004@yahoo.com> wrote:
> I want to know if there's any perl module
http://search.cpan.org
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 12 Aug 2004 11:45:22 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: My own handy Pocket Reference notes (please share your own also)
Message-Id: <mLISc.8377$X12.3911@edtnps84>
David Filmer wrote:
>
> ======================================================================
> Instead of: $answer = $var1 . func() . $var2; #Perl CookBook 1ed p.21
> $answer="$var1 ${\( SCALAR EXPR )} $var2"; #ie:"eat ${\($n+1)} pie"
>
> $answer = "$var1 @{[ LIST EXPR ]} $var2";
> (ie, $foo = "uppercase"; print "here is ${\( uc $foo )} text";)
> OR (ie, $foo = "uppercase"; print "here is @{[uc $foo]} text";
That's a bit of overkill for uppercase (or lowercase):
$foo = "uppercase"; print "here is \U$foo\E text";)
> ======================================================================
> To strip leading/trailing spaces:
> $foo =~ s/^\s+//; $foo =~ s/\s+$//;
Or a bit more idiomatic:
s/^\s+//, s/\s+$// for $foo;
> ======================================================================
> To replace $foo with $bar across an array:
> map {s/$foo/$bar/} @list; #no comma!
What's wrong with one comma instead of two braces? :-) Anyway, you should
use for instead of map in void context.
s/$foo/$bar/ for @list;
John
--
use Perl;
program
fulfillment
------------------------------
Date: 12 Aug 2004 08:01:16 -0700
From: bjohnsme@yahoo.com (bjohnsme)
Subject: Re: nat table and perl problem
Message-Id: <f0c2b2d1.0408120701.251756b4@posting.google.com>
I've found some more information out about this... the problem stems
from messing with the flag/offset bits in the packets. If I don't
muck with those, the packets go out fine... does anybody have any
ideas on how I could sneak these manipulated packets through NAT?
They seem get dropped no matter what...
thanks,
brad
bjohnsme@yahoo.com (bjohnsme) wrote in message news:<f0c2b2d1.0408101029.389d25cb@posting.google.com>...
> I have a perl script that I use to mangle packets by hand rather than
> using iptables to redirect for me. When I'm not using the perl script
> though, I want to have ipmasquerading turned on. My problem is this:
>
> My script runs fine so long as I don't ever run "iptables -t nat -F"
> (or for that matter, anything that uses -t nat). I'm sending packets
> using Net::RawSock.
>
> Once one of those commands are run, is there a way to undo them? I've
> tried stopping the service, but then running /etc/init.d/iptables
> status still returns info.
>
> How can I go about changing the rules so that it acts like a machine
> without iptables running at all? I set the default policies to
> accept, but this is no help either. Does anybody know if RawSock
> does something funky when it sends out packets that could be
> interfering with iptables? Any thoughts would be greatly
> appreciated.
------------------------------
Date: Thu, 12 Aug 2004 17:03:05 +0200
From: Sandman <mr@sandman.net>
Subject: Re: News::Scan question
Message-Id: <mr-086588.17030512082004@individual.net>
In article <10hkgun289n1f7d@corp.supernews.com>,
gbacon@hiwaay.net (Greg Bacon) wrote:
> How are you storing the articles in your database? If you're only
> inserting articles into a text or clob column, I don't see why you'd
> need any special module for processing articles.
>
> Your code mentions $art->subject, so are you looking to extract
> header fields? In that case, stick with Mail::Internet:
Thanks for your example, you set me on the right path.
--
Sandman[.net]
------------------------------
Date: Thu, 12 Aug 2004 15:45:34 +0530
From: Abhinav <matrix_calling@yahoo.dot.com>
Subject: Re: Parsing html by XML::libXML
Message-Id: <cyHSc.12$S26.101@news.oracle.com>
John7481 wrote:
> Hello everybody,
>
> A database project is targeted to use a perl script to parse the html
> file and picking few items from html file, it will insert those items
> into database.
Assuming that your HTML is XML compliant (ei.e. XHTML), you could try using
XPath. It does a great job of finding specific information, and /should/
be installed with your Perl 5.8 system.
There is an introductory tutorial on http://w3schools.org
[SNIP]
HTH
--
Abhinav
------------------------------
Date: 12 Aug 2004 12:04:07 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Perl PDF modules - help please
Message-Id: <cffmbn$b04$1@mamenchi.zrz.TU-Berlin.DE>
Andrew DeFaria <Andrew@DeFaria.com> wrote in comp.lang.perl.misc:
> Brian McCauley wrote:
>
> > To understand why this is not the case one needs to appreciate the
> > reasons behind the rules of netequette. Most of rules of netiquette
> > that we bang on about here boil down to one simple convention: "the
> > time freely given to assist others should be valued and must not be
> > squandered"[1].
>
> And some boil down to "That's the way we've always done it so we'll just
> keep doing it that way".
If you have a point, make it. What are those rules, and who is defending
them with the argument you quote?
Your opinions are of no interest.
Anno
------------------------------
Date: Thu, 12 Aug 2004 08:37:17 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Perl PDF modules - help please
Message-Id: <slrnchmskd.9dg.tadmc@magna.augustmail.com>
Eugene Mikheyev <eam@7ka.mipt.ru> wrote:
>> And you are apparently just another pitiful troll. Replying to you was
>> a pure waste of time.
> But you did that. So you do have a time to waste, don't you? :)
It was not a waste of time. I got useful information from the
followups to his post.
Flushed out 3 in a single thread, way to go Gunnar!
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 12 Aug 2004 17:01:07 +0300
From: "Eugene Mikheyev" <eam@7ka.mipt.ru>
Subject: Re: Perl PDF modules - help please
Message-Id: <cfft8m$fgc$1@news.univ.kiev.ua>
> It was not a waste of time. I got useful information from the
> followups to his post.
You did. Did he? :)
------------------------------
Date: Thu, 12 Aug 2004 16:43:36 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Perl PDF modules - help please
Message-Id: <2o1e51F5661sU1@uni-berlin.de>
Tad McClellan wrote:
> Eugene Mikheyev <eam@7ka.mipt.ru> wrote:
>> Gunnar Hjalmarsson wrote:
>>> And you are apparently just another pitiful troll. Replying to
>>> you was a pure waste of time.
>>
>> But you did that. So you do have a time to waste, don't you? :)
>
> It was not a waste of time. I got useful information from the
> followups to his post.
>
> Flushed out 3 in a single thread, way to go Gunnar!
I'm glad it served a good purpose, after all. :)
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: 12 Aug 2004 05:43:37 -0700
From: hunter@hunterandlori.com (Hunter Johnson)
Subject: Re: Reset <> without having it fail once?
Message-Id: <19afcf24.0408120443.6cbe88f@posting.google.com>
Jeff 'japhy' Pinyan <pinyaj@rpi.edu> wrote in message news:<Pine.SGI.3.96.1040811120216.30304D-100000@vcmr-64.server.rpi.edu>...
> On 11 Aug 2004, Hunter Johnson wrote:
>
> >What I've done is close(ARGV) so that my first while(<>) fails, assign
> >the (saved-off) parameters back to ARGV and then start a second
> >while(<>) loop. If I just "last" out of the first loop and reassign
> >@ARGV, it finished processing the file it was in the middle of.
>
> I believe that's because you haven't changed the filehandle ARGV, which is
> actually what is being read from.
>
> >Is there a way to reset the <> without forcing the failure by closing
> >it first?
>
> Can you show your code so I can get a better understanding of what it is
> you're doing now?
Here's a test script that demonstrates the effect:
#!/usr/bin/perl
$term = shift;
@saved = @ARGV;
while (<>) {
next unless /$term;ID=(.*)/;
$ID = $1;
last;
}
@ARGV = @saved;
while (<>) {
print if /\b$ID\b/;
}
__END__
If this is the contents of files log1:
This is some test data for id 12
For id 14 too
Username JILL;ID=14
More 12 data
More 14
And just a bit more for 12
and log2:
This is some test data for id 12
For id 14 too
Username JOHN;ID=12
More 12 data
More 14
And just a bit more for 12
then the output from 'test.pl JOHN log1 log2' is:
More 12 data
And just a bit more for 12
This is some test data for id 12
More 12 data
And just a bit more for 12
This is some test data for id 12
Username JOHN;ID=12
More 12 data
And just a bit more for 12
The first two lines of the output shouldn't be there, and they do
disappear if I use 'close (ARGV)' instead of 'last'. Which is no real
hardship, but in the actual program, I end up with a test like this:
$opt{'b'} ? last : close(ARGV);
because I may not be done with the initial "recon" reading, and I was
curious if there was Another Way To Do It. It seemed like something
that could be done, but the I only found pointers to having <> fail
once in the docs.
Thanks,
Hunter
--
hunter@hunterandlori.com
------------------------------
Date: 12 Aug 2004 05:50:02 -0700
From: hunter@hunterandlori.com (Hunter Johnson)
Subject: Re: Reset <> without having it fail once?
Message-Id: <19afcf24.0408120450.5b182c9e@posting.google.com>
gbacon@hiwaay.net (Greg Bacon) wrote in message news:<10hki27spuag523@corp.supernews.com>...
> In article <19afcf24.0408110651.2be939b0@posting.google.com>,
> Hunter Johnson <hunter@hunterandlori.com> wrote:
>
> : I've got a filter written that needs to read into the target files
> : (logs) for some additional information (finding a person's numeric ID
> : by the name passed in) and then pull the records from the logs
> : matching that additional information. This can include records
> : earlier in the file than the record that let me match up the name to
> : the ID.
>
> Are these large logs? Can you store the records and then search for the
> interesting bits in a second pass?
Each log is about 20 megs, but a days' worth of logs is 320 megs, and
there's an outside chance that the script could be run against all of
the logs (currently capped at 2 gigs, but configurable). So I'd rather
not.
> : What I've done is close(ARGV) so that my first while(<>) fails, assign
> : the (saved-off) parameters back to ARGV and then start a second
> : while(<>) loop. If I just "last" out of the first loop and reassign
> : @ARGV, it finished processing the file it was in the middle of.
> :
> : Is there a way to reset the <> without forcing the failure by closing
> : it first?
>
> It's a bigger-hammer approach, but here's another way:
[snip code]
Yeah, that seems even less pleasing that mine. :-)
Thanks,
Hunter
------------------------------
Date: Thu, 12 Aug 2004 09:56:20 -0400
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
To: Hunter Johnson <hunter@hunterandlori.com>
Subject: Re: Reset <> without having it fail once?
Message-Id: <Pine.SGI.3.96.1040812095212.38238B-100000@vcmr-64.server.rpi.edu>
[posted & mailed]
On 12 Aug 2004, Hunter Johnson wrote:
>#!/usr/bin/perl
>
>$term = shift;
>
>@saved = @ARGV;
>
>while (<>) {
> next unless /$term;ID=(.*)/;
> $ID = $1;
> last;
>}
>
>@ARGV = @saved;
>
>while (<>) {
> print if /\b$ID\b/;
>}
I see your situation now.
my @saved = @ARGV;
while (<>) {
if ($ID) { print if /\b$ID\b/ }
elsif (/$term;ID=(.*)/) { $ID = $1; @ARGV = @saved; close ARGV; }
}
This code has not been tested, but it looks correct to me.
That uses one while loop, but does still need to close ARGV. You have to
close ARGV.
--
Jeff "japhy" Pinyan % How can we ever be the sold short or
RPI Acacia Brother #734 % the cheated, we who for every service
RPI Corporation Secretary % have long ago been overpaid?
http://japhy.perlmonk.org/ %
http://www.perlmonks.org/ % -- Meister Eckhart
------------------------------
Date: Thu, 12 Aug 2004 14:35:24 -0000
From: gbacon@hiwaay.net (Greg Bacon)
Subject: Re: Reset <> without having it fail once?
Message-Id: <10hn01c4o4um629@corp.supernews.com>
In article <19afcf24.0408120443.6cbe88f@posting.google.com>,
Hunter Johnson <hunter@hunterandlori.com> wrote:
: [...]
:
: The first two lines of the output shouldn't be there, and they do
: disappear if I use 'close (ARGV)' instead of 'last'. Which is no real
: hardship, but in the actual program, I end up with a test like this:
:
: $opt{'b'} ? last : close(ARGV);
:
: because I may not be done with the initial "recon" reading, and I was
: curious if there was Another Way To Do It. It seemed like something
: that could be done, but the I only found pointers to having <> fail
: once in the docs.
Use exec!
$ cat try
#! /usr/local/bin/perl
use warnings;
use strict;
sub usage { "Usage: $0 [<term> | --id=<id>] file..\n" }
sub find_id {
my $who = shift;
my @saved = @ARGV;
my $pat = qr/\Q$who\E;ID=(.*)/o;
while (<>) {
next unless /$pat/;
no warnings 'exec';
exec $0, "--id=$1", @saved;
die "$0: exec: $!";
}
die "$0: no ID found!\n";
}
sub print_matching_records {
my $id = shift;
while (<>) {
print if /\b$id\b/;
}
}
## main
die usage unless @ARGV >= 2;
my $arg = shift;
if ($arg =~ /^--id=(.+)/) {
print_matching_records $1;
}
else {
find_id $arg;
}
$ ./try JOHN log1 log2
This is some test data for id 12
More 12 data
And just a bit more for 12
This is some test data for id 12
Username JOHN;ID=12
More 12 data
And just a bit more for 12
$ ./try JILL log1 log2
For id 14 too
Username JILL;ID=14
More 14
For id 14 too
More 14
$ ./try should-not-work log1 log2
./try: no ID found!
Hope this helps,
Greg
--
People say we make the market a god. It's more correct to say that we see
in commerce the hand of God using the free actions and choices of billions
of people to create orderliness where the pseudo-god of government only
creates chaos and destruction. -- Lew Rockwell
------------------------------
Date: 12 Aug 2004 10:21:29 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Returned mail is causing script to crash
Message-Id: <cffgb9$4c4$1@mamenchi.zrz.TU-Berlin.DE>
Two Heads <twoheads@NOSPAMtiscali.co.uk> wrote in comp.lang.perl.misc:
> Hi,
>
> I apologise if this is not strictly a Perl question but I am not sure
> where else to post this.
>
> One of my scripts sends an automated email to the customer. However if
> the email address is no longer valid the server(?) seems to return a
> message to the script informing it that the mail attempt failed and a
> copy of the mail is held in a certain folder.
>
> However the script is not expecting this message and the message seems
> to want to print itself to the screen causing the script to fail.
The subject says "crash", your text says "fail". How about telling
us what actually happens?
> The
> code for the mail routine is as follows;
>
> open(MAIL, "|$sendmailLoc $tenantMail")|| die "Cant send mail!\n";
> print MAIL "Subject: Rent Account Arrears Warning\n";
> print MAIL "From: $clientTitle\n";
> print MAIL "Message from $clientTitle\n
> For the attention of: $tenant\n\n";
> print MAIL "$arrsMessage\n\n";
> print MAIL "Account balance $curr_bal\n";
> close (MAIL);
>
> Is there a way I can catch the error message so that I can forward it
> elsewhere?
No idea. The code above is useless, depending, as it does, on the
values of half a dozen variables we don't know.
Post a self-contained example.
Anno
------------------------------
Date: Thu, 12 Aug 2004 10:23:32 -0000
From: "gnari" <gnari@simnet.is>
Subject: Re: Returned mail is causing script to crash
Message-Id: <cffgb4$1mo$1@news.simnet.is>
"Two Heads" <twoheads@NOSPAMtiscali.co.uk> wrote in message
news:vfdmh0lvbobs2g3pfdl1ta6fpglpknu1ms@4ax.com...
> However the script is not expecting this message and the message seems
> to want to print itself to the screen causing the script to fail. The
> code for the mail routine is as follows;
>
> open(MAIL, "|$sendmailLoc $tenantMail")|| die "Cant send mail!\n";
> print MAIL "Subject: Rent Account Arrears Warning\n";
> print MAIL "From: $clientTitle\n";
> print MAIL "Message from $clientTitle\n
> For the attention of: $tenant\n\n";
> print MAIL "$arrsMessage\n\n";
> print MAIL "Account balance $curr_bal\n";
> close (MAIL);
>
> Is there a way I can catch the error message so that I can forward it
> elsewhere?
test the result of close() and look at $! and $?
see perldoc -f close
gnari
------------------------------
Date: Thu, 12 Aug 2004 12:39:47 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: Returned mail is causing script to crash
Message-Id: <cffkme$m73$1@sun3.bham.ac.uk>
Two Heads wrote:
> One of my scripts sends an automated email to the customer. However if
> the email address is no longer valid the server(?) seems to return a
> message to the script informing it that the mail attempt failed and a
> copy of the mail is held in a certain folder.
>
> However the script is not expecting this message and the message seems
> to want to print itself to the screen causing the script to fail.
I suspect you are using the phrase "causing the script to fail" in an
unconventional way.
> The
> code for the mail routine is as follows;
>
> open(MAIL, "|$sendmailLoc $tenantMail")|| die "Cant send mail!\n";
> print MAIL "Subject: Rent Account Arrears Warning\n";
> print MAIL "From: $clientTitle\n";
> print MAIL "Message from $clientTitle\n
> For the attention of: $tenant\n\n";
> print MAIL "$arrsMessage\n\n";
> print MAIL "Account balance $curr_bal\n";
> close (MAIL);
>
> Is there a way I can catch the error message so that I can forward it
> elsewhere?
Piping both to and from a subprocess is complex. (For details see FAQ
"How can I open a pipe both to and from a command?").
Better to redirect STDERR to a temporary file then rewind the file read
it back. (For details see numerous previous threads).
http://groups.google.com/groups?q=redirect+STDERR+temporary+file+group%3Acomp.lang.perl.*
Note - you are not using the normal options on sendmail (see FAQ: "How
do I send mail?"). There are good reasons why these are the normal
options. For example by choosing to put $tenantMail into the command
line rather than using the more usual -t approach you open up a whole
can of worms with respect to shell metacharacters in $tenantMail.
You may also find that telling sendmail not to attempt to return errors
syncronously (an effect of one of the aforementioned options) helps a
bit but there are some errors (such as local mailq filesystem full) that
will always be returned syncronously. (For details RTFM on sendmail).
------------------------------
Date: Thu, 12 Aug 2004 11:08:24 +0100
From: Two Heads <twoheads@NOSPAMtiscali.co.uk>
Subject: Re: testing without shell access
Message-Id: <eqfmh0pb6pfunj5rbe02qns5rveimn5ihl@4ax.com>
On Thu, 12 Aug 2004 07:04:22 GMT, "Dan" <news.groups@earthlink.net>
wrote:
>Hi,
>
>A perspective client wants me to develop their website, but wants to use a
>particular web hosting service.
>
>The probelm is that the hosting service provides no shell access, so I have
>no way to test and debug the Perl scripts once I've uploaded them to the
>hosting service.
>
>The service is running Perl 5.6 and Apache 1.3.28 under Lynux. My PC is
>running Windows 98 Second Edition. The service they want to use will cost
>about one third the monthly cost of the hosting service I've used for my
>other clients.
>
>Can anyone suggest how I can solve the testing/ debugging problem?
>
>Thanks,
>Dan
>news.groups@earthlink.net
>
Hi,
I do a lot of work on shared hosted accounts without shell access and,
as Gunar said if you include some diagnostic commands at the start of
the script it will give some error reporting. I insert the following
code when debugging, after the shebang line. As well as giving a
message in the browser it prints detailed information in the file
scriptErr.txt
# Remove this when errors are resolved
use diagnostics -verbose; #print warning diagnostics
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
BEGIN {
print CGI::header();
open (STDERR, '>scriptErr.txt');
}
I also collect test values of variables thoughout the program so I can
see what is going on
$debug.="Client $client<br>";
and then print the values stored in $debug to the browser or write
them to a file.
I have running on windows Open Perl IDE which enables you to run
scripts and gives error output, but of course it can only be used for
limited testing for scripts that do not call on resources store on the
server.
I recently upgraded to the latest version of Indigostar and found that
it did not support the diagnostics module used in the above code, I
haven't solved that problem yet.
Cheers,
Mark
------------------------------
Date: 12 Aug 2004 12:29:43 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: testing without shell access
Message-Id: <Xns9543566B49D0Fasu1cornelledu@132.236.56.8>
Two Heads <twoheads@NOSPAMtiscali.co.uk> wrote in
news:eqfmh0pb6pfunj5rbe02qns5rveimn5ihl@4ax.com:
> On Thu, 12 Aug 2004 07:04:22 GMT, "Dan" <news.groups@earthlink.net>
> # Remove this when errors are resolved
> use diagnostics -verbose; #print warning diagnostics
I don't see
use strict;
diagnostics automatically turns on warnings, but lack of strict will
impede you.
> use CGI qw(:standard);
> use CGI::Carp qw(fatalsToBrowser);
> BEGIN {
> print CGI::header();
> open (STDERR, '>scriptErr.txt');
> }
>
...
Just make sure those files are not left floating around in your web
directory.
--
A. Sinan Unur
1usa@llenroc.ude.invalid
(remove '.invalid' and reverse each component for email address)
------------------------------
Date: Thu, 12 Aug 2004 08:48:09 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: testing without shell access
Message-Id: <slrnchmt8p.9ek.tadmc@magna.augustmail.com>
Two Heads <twoheads@NOSPAMtiscali.co.uk> wrote:
> open (STDERR, '>scriptErr.txt');
You should always, yes *always*, check the return value from open():
open (STDERR, '>scriptErr.txt') or die "could not open 'scriptErr.txt' $!";
or
open (STDERR, '>scriptErr.txt') or carp "could not open 'scriptErr.txt' $!";
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 12 Aug 2004 08:49:59 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: testing without shell access
Message-Id: <slrnchmtc7.9ek.tadmc@magna.augustmail.com>
Sherm Pendley <spamtrap@dot-app.org> wrote:
> Dan wrote:
>> Can anyone suggest how I can solve the testing/ debugging problem?
>
> Your best bet is to install Linux and Apache on your PC, mirroring the
> server environment as closely as you can. If you're not up to that, your
> second-best bet is to install Apache and Perl under Windows.
And if you must "serve Bill", then be sure to use "ASCII" or "text"
mode when FTPing your programs to the server.
--
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 6860
***************************************