comp.lang.perl.misc
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
February 2008
motuwethfrsasuw
    123 5
45678910 6
11121314151617 7
18192021222324 8
2526272829   9
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
  LWP user agent grabs the intermediate wait page after POST intead of the actual result page         


Author: bhabs
Date: Feb 11, 2008 21:50

Hi,

I wrote a small LWP based perl program to search the air fare from a
travel website using POST.

#!/usr/bin/perl
use strict;
use CGI;
use LWP;

my $web_browser = LWP::UserAgent->new();
push @{ $web_browser->requests_redirectable }, 'POST';
$web_browser->timeout(300);
my $web_response = ();
Show full article (1.42Kb)
3 Comments
  FAQ 3.15 How can I make my Perl program run faster?         


Author: PerlFAQ Server
Date: Feb 11, 2008 18:03

This is an excerpt from the latest version perlfaq3.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 .

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

3.15: How can I make my Perl program run faster?

The best way to do this is to come up with a better algorithm. This can
often make a dramatic difference. Jon Bentley's book *Programming
Pearls* (that's not a misspelling!) has some good tips on optimization,
too. Advice on benchmarking boils down to: benchmark and profile to make
sure you're optimizing the right part, look for better algorithms
instead of microtuning your code, and when all else fails consider just
buying faster hardware. You will probably want to read the answer to the
earlier question "How do I profile my Perl programs?" if you haven't
done so already.
Show full article (2.68Kb)
no comments
  A Gtk2 IRC Chat Client         


Author: deadpickle
Date: Feb 11, 2008 12:13

I am trying to build a chat client that uses IRC and is built in the
framework of Gtk2. So far it works well but not great. Right now the
client connects to a server and joins a channel. Also, the client can
send messages to the channel and amazingly they are received on the
channel. The problem I am encountering is that the chat client is not
receiving all the raw lines sent by the IRC server (for an example of
what I mean try this script: http://www.oreilly.com/pub/h/1964). If it
is not receiving all the lines then it can only send messages not
receive them. So I am looking for help on how I can get the program to
receive messages so that they can be displayed in the window.

#!/usr/local/bin/perl -w
use strict;
use Gtk2 '-init';
use Glib qw/TRUE FALSE/;
use IO::Socket;
Show full article (3.82Kb)
5 Comments
  FAQ 3.17 Is it safe to return a reference to local or lexical data?         


Author: PerlFAQ Server
Date: Feb 11, 2008 12:03

This is an excerpt from the latest version perlfaq3.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 .

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

3.17: Is it safe to return a reference to local or lexical data?

Yes. Perl's garbage collection system takes care of this so everything
works out right.

sub makeone {
my @a = ( 1 .. 10 );
return \@a;
}

for ( 1 .. 10 ) {
push @many, makeone();
}

print $many[4][5], "\n";

print "@many\n";

--------------------------------------------------------------------
Show full article (1.36Kb)
no comments
  please help me         


Author: tygryskacz1
Date: Feb 11, 2008 11:13

I am a student of Warsaw School of Economics. I write a master's
thesis about a opinion on managers.

I would like to ask you to fill in the survey (link below) by you and
as many members of your group as possible. It will help me to write my
thesis. It takes only up to 7 minutes to fill it in.

The survey:
http://entropy.be/~mag/limesurvey/index.php?sid=94762&lang=en

If you could please also forward this mail to other members of the
group.

I will be rally grateful for your help.

Yours sincerely
no comments
  DBI problems         


Author: alx__21
Date: Feb 11, 2008 09:11

Hello. Using the following test code:

#!/usr/bin/perl

use DBI;

$db_handle = DBI-
>connect("dbi:mysql:database=mysql;host=x.x.x.x;user=x;password=x")
or die "Couldn't connect to database: $DBI::errstr\n";

//I've edited out some data there obviously

open(FILEHANDLE, ">", "C:\\test.txt") || die('cannot open file: ' .
$!);

$sql = "SELECT * FROM hhdb2.handhelds";
$statement = $db_handle->prepare($sql)
or die "Couldn't prepare query '$sql': $DBI::errstr\n";

$statement->execute()
or die "Couldn't execute query '$sql': $DBI::errstr\n";
while ($row_ref = $statement->fetchrow_hashref())
{
print FILEHANDLE "$row_ref->{id}\n";
}
Show full article (1.27Kb)
4 Comments
  ppm package issue         


Author: adi
Date: Feb 11, 2008 08:11

Hi,

I'm trying to setup perl (I have ActivePerl 5.8.8) so I can install
Bugzilla
3.0.3 on Windows XP Pro, and Email-Send and Email-MIME-Modifier are
the recquired packages.

When I try to install the packages I get this message:

C:\bugzilla>ppm install Email-Send
ppm install failed: no package found

same with Email-MIME

I have already tried the method given in command prompt {ppm repo
u
--} but that doesnt work either.Any clues? Also tried to force the
installation----No Go.
I have also set up the http_proxy still no success.
Thanks,
1 Comment
  FAQ 3.19 How can I make my CGI script more efficient?         


Author: PerlFAQ Server
Date: Feb 11, 2008 06:03

This is an excerpt from the latest version perlfaq3.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 .

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

3.19: How can I make my CGI script more efficient?

Beyond the normal measures described to make general Perl programs
faster or smaller, a CGI program has additional issues. It may be run
several times per second. Given that each time it runs it will need to
be re-compiled and will often allocate a megabyte or more of system
memory, this can be a killer. Compiling into C isn't going to help you
because the process start-up overhead is where the bottleneck is.

There are two popular ways to avoid this overhead. One solution involves
running the Apache HTTP server (available from http://www.apache.org/ )
with either of the mod_perl or mod_fastcgi plugin modules.
Show full article (2.55Kb)
no comments
  è«‹å•         


Author: paperdo
Date: Feb 11, 2008 05:28

需è¦å¹«å¿™è«–æ–‡spss統計分æžå—Ž : 1.敘述統計 2.T檢定 3.ANOVA 4.ç›¸é—œåˆ†æž 5.因素分æž
6.單因å­è®Šç•°æ•¸åˆ†æž
或是打字.作業.翻譯.寫報告.校稿.
心得作業.文件.文章.考å·.文宣.ä¼ç•«.æµ·å ±.
留學.讀書計畫.推薦函.履歷.表格.排版.
ç°¡å ±.統計分æž.手冊.畢業專題.報表.傳單åŠåŸºæœ¬è³‡æ–™è¼¸å…¥.
å¯ä¾†ä¿¡è¯çµ¡ : Paperyo@gmail.com

--
æˆåŠŸæ¹–ç•”.. ☆ â— ▃▅▂ ☆ ▂▄▅▆▄▂ â–â–
楓橋夜泊.. ☆ ▆▄▅▆ â—‹ ◢▇◣ ▆▆▄▃▅▆ â–‰楓橋â–
â–½ │ │ â–‰驛站â–
_Ëâ–▂▃▂â–Ë_ ╰─ã„─┴─┴╯ Ëâ–‚â– ▇▇
éŠå®¢ï¼š paperdo _Ëâ–Ë_ _Ëâ–â–ƒ ────╯▃▂â–Ë_ Ëâ–â–‚â–Ë
故鄉: 220-137-94-21.dynamic.hinet.net ...
Show full article (1.32Kb)
4 Comments
  FAQ 3.13 How can I use curses with Perl?         


Author: PerlFAQ Server
Date: Feb 11, 2008 00:03

This is an excerpt from the latest version perlfaq3.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 .

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

3.13: How can I use curses with Perl?

The Curses module from CPAN provides a dynamically loadable object
module interface to a curses library. A small demo can be found at the
directory http://www.cpan.org/authors/Tom_Christiansen/scripts/rep.gz ;
this program repeats a command and updates the screen as needed,
rendering rep ps axu similar to top.

--------------------------------------------------------------------
Show full article (1.34Kb)
no comments