comp.lang.perl.misc
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
April 2008
motuwethfrsasuw
 123456 14
78910111213 15
14151617181920 16
21222324252627 17
282930     18
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.perl.misc Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  modules for nntp client         


Author: Gerry Ford
Date: Apr 13, 2008 22:25

Hello c.l.p.misc!

A resurgence of spam in places I would otherwise like has renewed my
interest in writing an nntp client. Someone else's (in the public domain)
has the following use statements, which I think I have to track down now.
The part I don't get right now is what follows the vanilla use statements

use strict; <---- this one I get for free
use Net::NNTP; <----already got this one
use Net::SMTP;
use HTTP::Date qw/time2str str2time/;
use MIME::QuotedPrint qw/encode_qp decode_qp/;
use Encode qw/encode decode/;
use POSIX qw/strftime/;
use File::stat;
use File::Temp qw/:mktemp/;
use Win32::ANSIConsole qw/coninit cls/;
, such as ^^^^^^^^.

What does it mean?

TIA, and cheers,
Show full article (0.89Kb)
13 Comments
  anyone has done this kind of perl/CGI?         


Author: robertchen117
Date: Apr 13, 2008 19:41

I want to make a cgi page like this:

there are 5 steps button, click one by one and get the step output.

Cgi should looks like this:

please click on each steps:

Step I button

step I execute output here:

then step II button:

step II output here:

....

the difficult part is the output is just below each steps' button. I
do not how to do it. Please help me.

Robert
1 Comment
  Some questions about q{} and qr{}.         


Author: Robbie Hatley
Date: Apr 13, 2008 18:07

Today I was editing a URL-likifying program I wrote several
weeks ago, and I ran across some issues with q{} and qr{}
which are puzzling me.

Here's an edited-for-brevity version of the program:

my $Legal = q{[[:alnum:];/?:@=&#%%$_.+!*'(),-]};
my $Regex1 = qr{($Legal+\.$Legal+/$Legal+)}
my $Regex2 = qr{(s?https?://$Legal+)};
while (<>)
{
s{$Regex1}{http://$1}g;
s{$Regex2}{\n

$1

\n}g;
print ($_);
}

(As an afterthought, I also tacked the entire program on the
end of this post, for anyone who's interested.)

I have two questions:
Show full article (4.26Kb)
21 Comments
  FAQ 9.17 How do I check a valid mail address?         


Author: PerlFAQ Server
Date: Apr 13, 2008 18:03

This is an excerpt from the latest version perlfaq9.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

9.17: How do I check a valid mail address?

(partly contributed by Aaron Sherman)

This isn't as simple a question as it sounds. There are two parts:

a) How do I verify that an email address is correctly formatted?

b) How do I verify that an email address targets a valid recipient?

Without sending mail to the address and seeing whether there's a human
on the other end to answer you, you cannot fully answer part *b*, but
either the "Email::Valid" or the "RFC::RFC822::Address" module will do
both part *a* and part *b* as far as you can in real-time.
Show full article (3.73Kb)
no comments
  FAQ 9.14 How do I make sure users can't enter values into a form that cause my CGI script to do bad things?         


Author: PerlFAQ Server
Date: Apr 13, 2008 12:03

This is an excerpt from the latest version perlfaq9.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

9.14: How do I make sure users can't enter values into a form that cause my CGI script to do bad things?

See the security references listed in the CGI Meta FAQ

http://www.perl.org/CGI_MetaFAQ.html

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

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.

If you'd like to help maintain the perlfaq, see the details in
perlfaq.pod.
no comments
  CGI.PM and print table         


Author: dtshedd
Date: Apr 13, 2008 09:13

trying to replace this

print "\n";
print "\n";
print "
td>
\n";

with this

print table(
TR([
td([submit(),reset()])
])
);

seems to work but then a new name/value pair for "submit" shows up in
the browser address bar

original query string

http://192.168.1.1/rocket.pl?page=1&keywords_string=3

new query string

http://192.168.1.1/rocket.pl?page=1&keywords_string=3&.submit=Submit+Query

what does this mean?

appreciate the help
Show full article (0.54Kb)
1 Comment
  FAQ 9.13 How do I edit my .htpasswd and .htgroup files with Perl?         


Author: PerlFAQ Server
Date: Apr 13, 2008 06:03

This is an excerpt from the latest version perlfaq9.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

9.13: How do I edit my .htpasswd and .htgroup files with Perl?

The HTTPD::UserAdmin and HTTPD::GroupAdmin modules provide a consistent
OO interface to these files, regardless of how they're stored. Databases
may be text, dbm, Berkeley DB or any database with a DBI compatible
driver. HTTPD::UserAdmin supports files used by the "Basic" and "Digest"
authentication schemes. Here's an example:

use HTTPD::UserAdmin ();
HTTPD::UserAdmin
->new(DB => "/foo/.htpasswd")
->add($username => $password);

--------------------------------------------------------------------
Show full article (1.53Kb)
no comments
  FAQ 9.2 My CGI script runs from the command line but not the browser. (500 Server Error)         


Author: PerlFAQ Server
Date: Apr 13, 2008 00:03

This is an excerpt from the latest version perlfaq9.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

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

9.2: My CGI script runs from the command line but not the browser. (500 Server Error)

Several things could be wrong. You can go through the "Troubleshooting
Perl CGI scripts" guide at

http://www.perl.org/troubleshooting_CGI.html

If, after that, you can demonstrate that you've read the FAQs and that
your problem isn't something simple that can be easily answered, you'll
probably receive a courteous and useful reply to your question if you
post it on comp.infosystems.www.authoring.cgi (if it's something to do
with HTTP or the CGI protocols). Questions that appear to be Perl
questions but are really CGI ones that are posted to comp.lang.perl.misc
are not so well received.

The useful FAQs, related documents, and troubleshooting guides are
listed in the CGI Meta FAQ:
Show full article (1.85Kb)
no comments