[29114] in Perl-Users-Digest
Perl-Users Digest, Issue: 358 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 19 14:09:54 2007
Date: Thu, 19 Apr 2007 11:09:06 -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, 19 Apr 2007 Volume: 11 Number: 358
Today's topics:
Re: Any Help? Stuck trying to create cgi perl program shadkeene@hotmail.com
Re: Any Help? Stuck trying to create cgi perl program shadkeene@hotmail.com
Re: Any Help? Stuck trying to create cgi perl program <jurgenex@hotmail.com>
Re: Any Help? Stuck trying to create cgi perl program shadkeene@hotmail.com
die problem? g4173c@motorola.com
Re: die problem? <someone@example.com>
Re: die problem? <purlgurl@purlgurl.net>
Re: FAQ 9.20 How do I send mail? <tadmc@augustmail.com>
Re: Help with nested pattern. <nobull67@gmail.com>
Lexical reference to an anonymous recursive subroutine: <lorian@fsavigny.de>
Re: Lexical reference to an anonymous recursive subrout <nobull67@gmail.com>
mime head alternative <jcharth@gmail.com>
Re: Server For Rent? Where? <nikos1337@gmail.com>
Re: Server For Rent? Where? <1usa@llenroc.ude.invalid>
Re: Server For Rent? Where? <someone@example.com>
Re: Server For Rent? Where? <nikos1337@gmail.com>
Re: Server For Rent? Where? <jurgenex@hotmail.com>
Re: Server For Rent? Where? <nikos1337@gmail.com>
Re: Server For Rent? Where? <jurgenex@hotmail.com>
Re: Server For Rent? Where? <nikos1337@gmail.com>
shorter question ref. simple code shadkeene@hotmail.com
Re: Top Turds of comp.lang.perl.misc (2007) <bart.lateur@pandora.be>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 19 Apr 2007 08:48:43 -0700
From: shadkeene@hotmail.com
Subject: Re: Any Help? Stuck trying to create cgi perl program
Message-Id: <1176997723.182807.141640@n76g2000hsh.googlegroups.com>
On Apr 18, 2:09 pm, Joe Smith <j...@inwap.com> wrote:
> shadke...@hotmail.com wrote:
> > Hi,
> > I've been learning perl/html while creating a program where the user
> > fills out textboxes and checkboxes while the program places the values
> > from the text and checkboxes into a .csv file. However, I want all
> > columns in the .csv file to correspond to the same text/checkbox each
> > time the user fills out the form so it's easy to run graphs and such
> > through excel. The problem is, if a checkbox isn't checked, no value
> > is returned
>
> That's trivial to fix. The CGI program should know the names of
> all the allowable text/checkbox items. When it goes through the list
> of returned items, it can supply a default value for anything that is
> missing.
>
> Since the browser and/or CGI parser may produce a list of returned
> items in random order, you want to go through them in a specific
> order before creating the CSV data.
>
> @fields = qw(name addr1 addr2 phone zip box1 box2 box3);
> push @output,$param{$_} || '""' for @fields;
>
> -Joe
Joe, I think I understand what you're doing and I've tried to apply it
to my program, but I'm getting error messages stating "@fields,
@output, %param, @fields, @output" require explicit package name.
I'll show you what I wrote:
@fields = qw(AE, EG, amTAF, pmTAF) ###where the textbox1, etc are
some names for the textboxes and checkboxes in my html code
push @output,$param{$_} || '"'" for @fields;
foreach my $i(@output) {
print OUT "$i,";
}
It looked like you were getting all the values into the @output array,
and then I'm just trying to print them out one by one into columns.
Thanks for any help as trivial as it may be.
The code I was using prior to this was utilizing hashes but didn't
return the values of unchecked boxes...
my %form;
foreach my $p (param()) {
$form($p) = param($);
print OUT "$form{$p},";
}
Shad
------------------------------
Date: 19 Apr 2007 08:52:56 -0700
From: shadkeene@hotmail.com
Subject: Re: Any Help? Stuck trying to create cgi perl program
Message-Id: <1176997975.962669.139360@y80g2000hsf.googlegroups.com>
On Apr 19, 8:48 am, shadke...@hotmail.com wrote:
> On Apr 18, 2:09 pm, Joe Smith <j...@inwap.com> wrote:
>
>
>
>
>
> > shadke...@hotmail.com wrote:
> > > Hi,
> > > I've been learning perl/html while creating a program where the user
> > > fills out textboxes and checkboxes while the program places the values
> > > from the text and checkboxes into a .csv file. However, I want all
> > > columns in the .csv file to correspond to the same text/checkbox each
> > > time the user fills out the form so it's easy to run graphs and such
> > > through excel. The problem is, if a checkbox isn't checked, no value
> > > is returned
>
> > That's trivial to fix. The CGI program should know the names of
> > all the allowable text/checkbox items. When it goes through the list
> > of returned items, it can supply a default value for anything that is
> > missing.
>
> > Since the browser and/or CGI parser may produce a list of returned
> > items in random order, you want to go through them in a specific
> > order before creating the CSV data.
>
> > @fields = qw(name addr1 addr2 phone zip box1 box2 box3);
> > push @output,$param{$_} || '""' for @fields;
>
> > -Joe
>
> Joe, I think I understand what you're doing and I've tried to apply it
> to my program, but I'm getting error messages stating "@fields,
> @output, %param, @fields, @output" require explicit package name.
> I'll show you what I wrote:
>
> @fields = qw(AE, EG, amTAF, pmTAF) ###where the textbox1, etc are
> some names for the textboxes and checkboxes in my html code
> push @output,$param{$_} || '"'" for @fields;
>
> foreach my $i(@output) {
> print OUT "$i,";
>
> }
>
> It looked like you were getting all the values into the @output array,
> and then I'm just trying to print them out one by one into columns.
> Thanks for any help as trivial as it may be.
>
> The code I was using prior to this was utilizing hashes but didn't
> return the values of unchecked boxes...
>
> my %form;
> foreach my $p (param()) {
> $form($p) = param($);
> print OUT "$form{$p},";
>
> }
>
> Shad- Hide quoted text -
>
> - Show quoted text -
The msg I just posted has an error...'"'" should read '""'...
Shad
------------------------------
Date: Thu, 19 Apr 2007 16:04:59 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Any Help? Stuck trying to create cgi perl program
Message-Id: <LqMVh.10653$IG1.7730@trndny07>
shadkeene@hotmail.com wrote:
> to my program, but I'm getting error messages stating "@fields,
> @output, %param, @fields, @output" require explicit package name.
Did you declare the variables?
> I'll show you what I wrote:
>
> @fields = qw(AE, EG, amTAF, pmTAF) ###where the textbox1, etc are
Did you declare @fields somewhere before this line?
jue
------------------------------
Date: 19 Apr 2007 09:21:40 -0700
From: shadkeene@hotmail.com
Subject: Re: Any Help? Stuck trying to create cgi perl program
Message-Id: <1176999700.950200.308280@d57g2000hsg.googlegroups.com>
On Apr 19, 9:04 am, "J=FCrgen Exner" <jurge...@hotmail.com> wrote:
> shadke...@hotmail.com wrote:
> > to my program, but I'm getting error messages stating "@fields,
> > @output, %param, @fields, @output" require explicit package name.
>
> Did you declare the variables?
>
> > I'll show you what I wrote:
>
> > @fields =3D qw(AE, EG, amTAF, pmTAF) ###where the textbox1, etc are
>
> Did you declare @fields somewhere before this line?
>
> jue
Jurgen...wie geht es dir? I don't know too much German, but enjoy the
language...recently visited the country during the world cup.
Just posted a msg after you replied...I declared @fields by writing my
@fields =3D qw(AE, EG, amTAF, pmTAF, etc) in the code. That error went
away but still have the %param error. Is the "my" enough to declare
the array @fields? Thanks,
Shad
------------------------------
Date: 19 Apr 2007 09:47:20 -0700
From: g4173c@motorola.com
Subject: die problem?
Message-Id: <1177001240.332163.11920@o5g2000hsb.googlegroups.com>
Hi:
I have the following code:
#
# First Check out the File...
#
system ("cleatool co -unr -nc $revfilename") || die "Error:
Couldn't Check Out $revfilename: $!\n";
#
# Open File, find the REV variable name and increament...
#
open (REVFILE, "+<$revfilename") || die "Couldn't Open File
$revfilename: $!\n";
The system call has a typo for the command. I thought that it should
have stopped there, however I get this:
Can't exec "cleatool": No such file or directory at ba line 83,
<ALTERA> line 6.
Couldn't Open File pkg.vhd: Permission denied
What am I doing wrong? Shouldn't it have exited on the cleatool error?
Thanks for any help in advance!
Tom
------------------------------
Date: Thu, 19 Apr 2007 17:16:05 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: die problem?
Message-Id: <ptNVh.8248$VF5.6166@edtnps82>
g4173c@motorola.com wrote:
>
> I have the following code:
>
> #
> # First Check out the File...
> #
> system ("cleatool co -unr -nc $revfilename") || die "Error:
> Couldn't Check Out $revfilename: $!\n";
> #
> # Open File, find the REV variable name and increament...
> #
> open (REVFILE, "+<$revfilename") || die "Couldn't Open File
> $revfilename: $!\n";
>
>
> The system call has a typo for the command. I thought that it should
> have stopped there, however I get this:
>
> Can't exec "cleatool": No such file or directory at ba line 83,
> <ALTERA> line 6.
> Couldn't Open File pkg.vhd: Permission denied
>
> What am I doing wrong? Shouldn't it have exited on the cleatool error?
No.
perldoc -f system
John
--
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order. -- Larry Wall
------------------------------
Date: Thu, 19 Apr 2007 10:23:24 -0700
From: Purl Gurl <purlgurl@purlgurl.net>
Subject: Re: die problem?
Message-Id: <fI-dnUC57skZOLrbnZ2dnUVZ_qWvnZ2d@giganews.com>
g4173c wrote:
> system ("cleatool co -unr -nc $revfilename") || die "Error:
> Couldn't Check Out $revfilename: $!\n";
> The system call has a typo for the command. I thought that it should
> have stopped there, however I get this:
> Can't exec "cleatool": No such file or directory at ba line 83,
> <ALTERA> line 6.
Your system call is successful. An error message is returned to
your call, which is success. Your argument "cleatool" is incorrect
but your "system" call successfully runs and completes; no system
error code is returned.
Note this difference between "system" and "exec" is this example code,
#!perl
system ("bad command") || die "Call Failed $!";
print "\n system call finished\n\n";
exec `bad command` || die "\n Execute Failed $!";
print "\n execute finished";
PRINTED RESULTS:
'bad' is not recognized as an internal or external command,
operable program or batch file.
system call finished
'bad' is not recognized as an internal or external command,
operable program or batch file.
Execute Failed No such file or directory at test.pl line 7.
Purl Gurl
------------------------------
Date: Thu, 19 Apr 2007 07:19:43 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: FAQ 9.20 How do I send mail?
Message-Id: <slrnf2eniv.e0q.tadmc@tadmc30.august.net>
timdooling <timdooling@qconline.com> wrote:
> print SENDMAIL 'From: timdooling@qconline.com';
There should be a newline at the end of each header "line".
> close(SENDMAIL);
You should check the return value from close() on piped filehandles.
> PPS - Do try to respect others in your responses.
Why do you mention that?
Have you gotten a disrespectful response here already?
I can't find one...
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 19 Apr 2007 05:03:37 -0700
From: Brian McCauley <nobull67@gmail.com>
Subject: Re: Help with nested pattern.
Message-Id: <1176984217.690577.190540@o5g2000hsb.googlegroups.com>
On Apr 14, 12:28 pm, "Brian McCauley" <nobul...@gmail.com> wrote:
> # Remove sub-brackets
> $out =~ s/(?<!\A)$re//g;
\A is zero width (so look-behind = look-ahead) and without a /m
qualifier it's equivalent to ^ so the above is more neatly written as:
$out =~ s/(?!^)$re//g;
------------------------------
Date: 19 Apr 2007 10:07:15 -0700
From: florian <lorian@fsavigny.de>
Subject: Lexical reference to an anonymous recursive subroutine: impossible?
Message-Id: <1177002435.463877.52850@n76g2000hsh.googlegroups.com>
Hello
It might sound slightly like a joke, but I am precisely trying to
implement the above. The reasons are as follows:
- I am programming a library function (in a module) that has a helper
function. Ideally, this helper function should be visible only to the
library function which uses it. Knowing that it is possible to say
{
my $lexical_var = 0;
sub foo {$lexical_var++;}
sub bar {print $lexical_var;}
}
to the effect is that
foo(); foo(); bar();
will print "2", but
print $lexical_var;
will yield an uninitialized variable error, I've tried to do the same
with a subroutine declaration, saying "my sub helper_function { ... ",
to learn that this is not yet implemented. As it is possible to store
a reference to an anonymous subroutine in a variable:
$helper_function = sub { ... };
and use it saying
$helper_function->(<args, if any>); # or:
&$helper_function(<args, if any>);
I've resourcefully tried to use that knowledge to implement it.
However, the fact that my helper function is recursive on top of it
all seems to be a problem: The following works:
$times = 0;
$code_ref = sub {
$times++;
print "Hello, there!\n";
$code_ref->() until ($times == 3);
};
$code_ref->(); # prints "Hello, there!" three times
but this (the line numbers are not part of the code):
1 $times = 0;
2
3 {
4
5 my $code_ref = sub {
6 $times++;
7 print "Hello, there!\n";
8 $code_ref->() until ($times == 3);
9 };
10
11 $code_ref->();
12
13 }
prints
> Hello, there!
> Undefined subroutine &main:: called at script line 8.
Thus, the anonymous subroutine referenced to in $code_ref is called
exactly once (from line 11), but apparently it cannot be found when
called from within itself (at line 8). (More precise, I assume, would
be to say "from within the subroutine, the variable is not visible",
or "it cannot be dereferenced via this variable")
The explanation that the variable $code_ref has gone out of scope
within the subroutine declaration seems to suggest itself, but I
couldn't claim that I understand this, since the declaration is within
the same block (and hence I'm anything else but confident that it is
in fact the reason).
Is there anybody who can, and would care to, explain the reasons for
this?
Thanks very much!
Florian
------------------------------
Date: 19 Apr 2007 10:42:31 -0700
From: Brian McCauley <nobull67@gmail.com>
Subject: Re: Lexical reference to an anonymous recursive subroutine: impossible?
Message-Id: <1177004551.640382.147460@n76g2000hsh.googlegroups.com>
On Apr 19, 6:07 pm, florian <lor...@fsavigny.de> wrote:
> It might sound slightly like a joke, but I am precisely trying to
> implement the above. The reasons are as follows:
>
> - I am programming a library function (in a module) that has a helper
> function. Ideally, this helper function should be visible only to the
> library function which uses it. Knowing that it is possible to say
>
> {
> my $lexical_var = 0;
> sub foo {$lexical_var++;}
> sub bar {print $lexical_var;}
> }
>
> to the effect is that
>
> foo(); foo(); bar();
>
> will print "2", but
>
> print $lexical_var;
>
> will yield an uninitialized variable error, I've tried to do the same
> with a subroutine declaration, saying "my sub helper_function { ... ",
> to learn that this is not yet implemented. As it is possible to store
> a reference to an anonymous subroutine in a variable:
>
> $helper_function = sub { ... };
>
> and use it saying
>
> $helper_function->(<args, if any>); # or:
> &$helper_function(<args, if any>);
>
> I've resourcefully tried to use that knowledge to implement it.
> However, the fact that my helper function is recursive on top of it
> all seems to be a problem: The following works:
>
> $times = 0;
>
> $code_ref = sub {
> $times++;
> print "Hello, there!\n";
> $code_ref->() until ($times == 3);
> };
>
> $code_ref->(); # prints "Hello, there!" three times
>
> but this (the line numbers are not part of the code):
Please refrain from modifying your code in any way so that we can't
simply cut-n-paste.
If you need to refer to lines of your sample code in the narrative do
so by putting comments in the code and referring to those.
> 1 $times = 0;
> 2
> 3 {
> 4
> 5 my $code_ref = sub {
> 6 $times++;
> 7 print "Hello, there!\n";
> 8 $code_ref->() until ($times == 3);
> 9 };
> 10
> 11 $code_ref->();
> 12
> 13 }
>
> prints
>
> > Hello, there!
> > Undefined subroutine &main:: called at script line 8.
You forgot to use strict. Had you used strict you've had got a
different (and much more helpful) error. How much pain do you need
before you use strict?
> Thus, the anonymous subroutine referenced to in $code_ref is called
> exactly once (from line 11), but apparently it cannot be found when
> called from within itself (at line 8). (More precise, I assume, would
> be to say "from within the subroutine, the variable is not visible",
> or "it cannot be dereferenced via this variable")
Yes, the lexical variable is not in scope so you are accessing
$main::code_ref.
> The explanation that the variable $code_ref has gone out of scope
> within the subroutine declaration seems to suggest itself,
No, it's not that is has gone out of scope, but rather it hasn't come
into scope yet.
> Is there anybody who can, and would care to, explain the reasons for
> this?
Exactly the same reason as you'll get an error from
use strict;
my $foo = $foo;
The scope of a lexical variable starts at the statement following he
declaration. Within the declaration statement the lexical variable is
not yet in scope.
This is one of the few times when it actually makes sense to separate
the declaration and initialisation.
use strict; # Always!
use warnings; # Always!
my $times = 0;
{
my $code_ref;
$code_ref = sub {
$times++;
print "Hello, there!\n";
$code_ref->() until ($times == 3);
};
$code_ref->();
undef $code_ref;
}
Note the final undef. This is because you've created a circular
reference. Without the explicit undef, when the execution pointer
passes the point where the variable $code_ref goes out of scope the
closure will not get garbage collected.
Personally I don't like having to manually make sure that $code_ref
gets undef()ed on _every_ _possible_ execution path so I use a package
variable and local.
For details see my previous posts on this matter:
http://groups.google.com/group/comp.lang.perl.misc/browse_frm/thread/caa4307138ea1063/488fd05e61b50583
http://groups.google.com/group/comp.lang.perl.misc/browse_frm/thread/c53ddd46fa3891be/757984a52cd091ae
http://groups.google.com/group/comp.lang.perl.misc/browse_frm/thread/e00e827ea3f9ab6f/2fbfe18a8d5e7acd
------------------------------
Date: 19 Apr 2007 10:42:19 -0700
From: joe <jcharth@gmail.com>
Subject: mime head alternative
Message-Id: <1177004539.741221.173720@l77g2000hsb.googlegroups.com>
Hello I am using mime::head to read emails quarantine by amavis and
search the FROM and TO fields. Some times it fails to read the file,
usually when there are other strange headers in the files. Is there
another module to do this? any recommendations? thanks.
------------------------------
Date: 19 Apr 2007 04:03:20 -0700
From: skieros <nikos1337@gmail.com>
Subject: Re: Server For Rent? Where?
Message-Id: <1176980600.069084.28830@l77g2000hsb.googlegroups.com>
On Apr 19, 12:17 pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
> PS: for the *very rare* situations in which I have/want to, I have
> access to a few machines kindly offered to me by friends.
Well does someone of you want to give me access to a server of his
please so to start hosting a website that i made so to be abel to save
money for renting a server?
If you dont want to it for free i understand but i can afford 5-10$/
month.
Please accept my offer, servers just cost to much...
------------------------------
Date: Thu, 19 Apr 2007 12:06:30 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Server For Rent? Where?
Message-Id: <Xns99175279BAA8Casu1cornelledu@127.0.0.1>
skieros <nikos1337@gmail.com> wrote in news:1176980600.069084.28830
@l77g2000hsb.googlegroups.com:
> On Apr 19, 12:17 pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
>
>> PS: for the *very rare* situations in which I have/want to, I have
>> access to a few machines kindly offered to me by friends.
>
> Well does someone of you want to give me access to a server of his
> please so to start hosting a website that i made so to be abel to save
> money for renting a server?
...
I think that is an offer we *can* refuse. In any case, this is not the
right group for this discussion. You seem unable to understand the polite
hints people have been dropping.
Bye,
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>
------------------------------
Date: Thu, 19 Apr 2007 13:28:41 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Server For Rent? Where?
Message-Id: <d8KVh.8329$j%5.2313@edtnps90>
skieros wrote:
> On Apr 19, 12:17 pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
>
>>PS: for the *very rare* situations in which I have/want to, I have
>>access to a few machines kindly offered to me by friends.
>
> Well does someone of you want to give me access to a server of his
Every computer I own is a server as they all run Linux/BSD, and *no* I will
not give you access to one but you can download and install Linux or BSD yourself.
John
--
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order. -- Larry Wall
------------------------------
Date: 19 Apr 2007 07:19:35 -0700
From: skieros <nikos1337@gmail.com>
Subject: Re: Server For Rent? Where?
Message-Id: <1176992374.987947.225000@o5g2000hsb.googlegroups.com>
On Apr 19, 4:28 pm, "John W. Krahn" <some...@example.com> wrote:
> skieros wrote:
> > On Apr 19, 12:17 pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
>
> >>PS: for the *very rare* situations in which I have/want to, I have
> >>access to a few machines kindly offered to me by friends.
>
> > Well does someone of you want to give me access to a server of his
>
> Every computer I own is a server as they all run Linux/BSD, and *no* I will
> not give you access to one but you can download and install Linux or BSD yourself.
I laready know that. As a matter of fatc i do have a dual boot system
but problem is i cant serve customers from an adsl line of 256kbit
upload.
>From now and one please only people answerign this post with a "yes" i
can rent you a linxu server answer my offer, not every and each of you
posting to just say no...
------------------------------
Date: Thu, 19 Apr 2007 14:37:19 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Server For Rent? Where?
Message-Id: <z8LVh.16384$Ln5.7294@trndny06>
skieros wrote:
>>> Well does someone of you want to give me access to a server of his
>> From now and one
What do you mean with "now and one"? I am not familiar with this term.
> please only people answerign this post with a "yes"
>> i
> can rent you a linxu server answer my offer, not every and each of you
> posting to just say no...
You don't get it, do you? Once again very slowly, such that maybe even you
can understand:
THIS USENET NEWSGROUP IS FOR DISCUSSING THE Perl PROGRAMMING LANGUAGE.
This group has nothing to do with CGI and it has nothing to do with web
servers and it certainly has nothing to do with aquiring whatever server it
is you are looking for, no matter if for rent or for free.
jue
------------------------------
Date: 19 Apr 2007 08:02:32 -0700
From: skieros <nikos1337@gmail.com>
Subject: Re: Server For Rent? Where?
Message-Id: <1176994952.691074.82880@d57g2000hsg.googlegroups.com>
On Apr 19, 5:37 pm, "J=FCrgen Exner" <jurge...@hotmail.com> wrote:
> skieros wrote:
> >>> Well does someone of you want to give me access to a server of his
> >> From now and one
>
> What do you mean with "now and one"? I am not familiar with this term.
>
> > please only people answerign this post with a "yes"
> >> i
> > can rent you a linxu server answer my offer, not every and each of you
> > posting to just say no...
>
> You don't get it, do you? Once again very slowly, such that maybe even you
> can understand:
>
> THIS USENET NEWSGROUP IS FOR DISCUSSING THE Perl PROGRAMMING LANGUAGE.
>
> This group has nothing to do with CGI and it has nothing to do with web
> servers and it certainly has nothing to do with aquiring whatever server =
it
> is you are looking for, no matter if for rent or for free.
>
> jue
I knwo whats this group is about but sometiems you cna get help from
anywhere.
------------------------------
Date: Thu, 19 Apr 2007 16:03:25 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Server For Rent? Where?
Message-Id: <hpMVh.6423$Qa.20@trndny08>
skieros wrote:
>> THIS USENET NEWSGROUP IS FOR DISCUSSING THE Perl PROGRAMMING
>> LANGUAGE.
>>
>> This group has nothing to do with CGI and it has nothing to do with
>> web servers and it certainly has nothing to do with aquiring
>> whatever server it is you are looking for, no matter if for rent or
>> for free.
>
> I knwo whats this group is about
No, I guess you don't get it.
> but sometiems you cna get help from
> anywhere.
Plus again my spell checker complained about 4 unkown words in just 1
sentence, over 25% misspelled.
Well, you certainly won't get any reply from me any more.
*PLONK*
jue
------------------------------
Date: 19 Apr 2007 09:10:14 -0700
From: skieros <nikos1337@gmail.com>
Subject: Re: Server For Rent? Where?
Message-Id: <1176999014.410041.239110@l77g2000hsb.googlegroups.com>
On Apr 19, 7:03 pm, "J=FCrgen Exner" <jurge...@hotmail.com> wrote:
> skieros wrote:
> >> THIS USENET NEWSGROUP IS FOR DISCUSSING THE Perl PROGRAMMING
> >> LANGUAGE.
>
> >> This group has nothing to do with CGI and it has nothing to do with
> >> web servers and it certainly has nothing to do with aquiring
> >> whatever server it is you are looking for, no matter if for rent or
> >> for free.
>
> > I knwo whats this group is about
>
> No, I guess you don't get it.
>
> > but sometiems you cna get help from
> > anywhere.
>
> Plus again my spell checker complained about 4 unkown words in just 1
> sentence, over 25% misspelled.
>
> Well, you certainly won't get any reply from me any more.
>
> *PLONK*
>
> jue
Couldnt care less....and i dotn have an online spelling checker, the
typos are due to speed iam writing...
------------------------------
Date: 19 Apr 2007 09:06:18 -0700
From: shadkeene@hotmail.com
Subject: shorter question ref. simple code
Message-Id: <1176998778.620268.201760@y5g2000hsa.googlegroups.com>
On Apr 19, 8:52 am, shadke...@hotmail.com wrote:
> On Apr 19, 8:48 am, shadke...@hotmail.com wrote:
>
>
>
>
>
> > On Apr 18, 2:09 pm, Joe Smith <j...@inwap.com> wrote:
>
> > > shadke...@hotmail.com wrote:
> > > > Hi,
> > > > I've been learning perl/html while creating a program where the user
> > > > fills out textboxes and checkboxes while the program places the values
> > > > from the text and checkboxes into a .csv file. However, I want all
> > > > columns in the .csv file to correspond to the same text/checkbox each
> > > > time the user fills out the form so it's easy to run graphs and such
> > > > through excel. The problem is, if a checkbox isn't checked, no value
> > > > is returned
>
> > > That's trivial to fix. The CGI program should know the names of
> > > all the allowable text/checkbox items. When it goes through the list
> > > of returned items, it can supply a default value for anything that is
> > > missing.
>
> > > Since the browser and/or CGI parser may produce a list of returned
> > > items in random order, you want to go through them in a specific
> > > order before creating the CSV data.
>
> > > @fields = qw(name addr1 addr2 phone zip box1 box2 box3);
> > > push @output,$param{$_} || '""' for @fields;
>
> > > -Joe
>
> > Joe, I think I understand what you're doing and I've tried to apply it
> > to my program, but I'm getting error messages stating "@fields,
> > @output, %param, @fields, @output" require explicit package name.
> > I'll show you what I wrote:
>
> > @fields = qw(AE, EG, amTAF, pmTAF) ###where the textbox1, etc are
> > some names for the textboxes and checkboxes in my html code
> > push @output,$param{$_} || '"'" for @fields;
>
> > foreach my $i(@output) {
> > print OUT "$i,";
>
> > }
>
> > It looked like you were getting all the values into the @output array,
> > and then I'm just trying to print them out one by one into columns.
> > Thanks for any help as trivial as it may be.
>
> > The code I was using prior to this was utilizing hashes but didn't
> > return the values of unchecked boxes...
>
> > my %form;
> > foreach my $p (param()) {
> > $form($p) = param($);
> > print OUT "$form{$p},";
>
> > }
>
> > Shad- Hide quoted text -
>
> > - Show quoted text -
>
> The msg I just posted has an error...'"'" should read '""'...
> Shad- Hide quoted text -
>
> - Show quoted text -
> > On Apr 18, 2:09 pm, Joe Smith <j...@inwap.com> wrote:
>
> > > shadke...@hotmail.com wrote:
> > > > Hi,
> > > > I've been learning perl/html while creating a program where the user
> > > > fills out textboxes and checkboxes while the program places the values
> > > > from the text and checkboxes into a .csv file. However, I want all
> > > > columns in the .csv file to correspond to the same text/checkbox each
> > > > time the user fills out the form so it's easy to run graphs and such
> > > > through excel. The problem is, if a checkbox isn't checked, no value
> > > > is returned
>
> > > That's trivial to fix. The CGI program should know the names of
> > > all the allowable text/checkbox items. When it goes through the list
> > > of returned items, it can supply a default value for anything that is
> > > missing.
>
> > > Since the browser and/or CGI parser may produce a list of returned
> > > items in random order, you want to go through them in a specific
> > > order before creating the CSV data.
>
> > > @fields = qw(name addr1 addr2 phone zip box1 box2 box3);
> > > push @output,$param{$_} || '""' for @fields;
>
> > > -Joe
>
> > Joe, I think I understand what you're doing and I've tried to apply it
> > to my program, but I'm getting error messages stating "@fields,
> > @output, %param, @fields, @output" require explicit package name.
> > I'll show you what I wrote:
>
> > @fields = qw(AE, EG, amTAF, pmTAF) ###where the textbox1, etc are
> > some names for the textboxes and checkboxes in my html code
> > push @output,$param{$_} || '"'" for @fields;
>
> > foreach my $i(@output) {
> > print OUT "$i,";
>
> > }
>
> > It looked like you were getting all the values into the @output array,
> > and then I'm just trying to print them out one by one into columns.
> > Thanks for any help as trivial as it may be.
>
> > The code I was using prior to this was utilizing hashes but didn't
> > return the values of unchecked boxes...
>
> > my %form;
> > foreach my $p (param()) {
> > $form($p) = param($);
> > print OUT "$form{$p},";
>
> > }
>
> > Shad- Hide quoted text -
>
> > - Show quoted text -
>
> The msg I just posted has an error...'"'" should read '""'...
> Shad- Hide quoted text -
>
> - Show quoted text -
A shorter question ref. the code...I know what was missing...I
declared the @fields with "my" and declared a my @output as well to
eliminate some of the errors...however, I'm still receiving an error
for the global symbol "%param" requiring explicit package. Wondering
why since %param isn't in the code. Thanks again for any help...
Shad
------------------------------
Date: Thu, 19 Apr 2007 17:27:12 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Top Turds of comp.lang.perl.misc (2007)
Message-Id: <kh9f23pq44hsffas45f6hjauq53bmqu5cm@4ax.com>
Peter J. Holzer wrote:
>You will
>dismiss it as a toy for small scripts, and not accept it as an
>"industrial strength" language because it isn't compiled, doesn't do
>typechecking, and isn't supported by CASE tools.
A need for case tools is a sign of weaknesses in the language.
Just IMO, of course. :)
--
Bart.
------------------------------
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 V11 Issue 358
**************************************