comp.lang.perl.misc
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
December 2006
motuwethfrsasuw
    123 48
45678910 49
11121314151617 50
18192021222324 51
25262728293031 52
2006
 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
  FAQ 3.13 How can I use curses with Perl?         


Author: PerlFAQ Server
Date: Dec 6, 2006 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.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.41Kb)
no comments
  type casting for DBI SQL statement doesn't work         


Author: stroncococcus
Date: Dec 6, 2006 13:51

Hy there!

I am just writing a little script to put something into a postgresql
database table.
My prepare statement:
my $mature_link_update = $dbh->prepare("UPDATE mature_mirna SET
loop_links = (loop_links || ARRAY[?]) WHERE mat_accession=?");

But whenever I execute this, with
$mature_link_update->execute($loop_table_id, $mat_accession);
or
$mature_link_update->execute(int($loop_table_id), $mat_accession);
then I get this error:
"operator does not exist: integer[] || text[]
HINT: No operator matches the given name and argument type(s). You may
need to add explicit type casts."

So the variable $loop_table_id is interpreted as text everytime.
What can I do, that it is handled as integer?

Many thanks in advance,
Kai
4 Comments
  Perl based SMTP server?         


Author: Peter Smith [gjfc]
Date: Dec 6, 2006 13:36

People,

I have sendmail working on my linux box.

Since I can use sendmail to send e-mails, would it be easy to write a
simple Perl script which listens for data on port 25?

Then, if it gets some data, it just passes it to sendmail.

Do any of you know if such a simple script is floating around somewhere
on the net?

...Peter
http://GoodJobFastCar.com
no comments
  Perl based SMTP server?         


Author: Peter Smith [gjfc]
Date: Dec 6, 2006 13:36

People,

I have sendmail working on my linux box.

Since I can use sendmail to send e-mails, would it be easy to write a
simple Perl script which listens for data on port 25?

Then, if it gets some data, it just passes it to sendmail.

Do any of you know if such a simple script is floating around somewhere
on the net?

...Peter
http://GoodJobFastCar.com
1 Comment
  $escalar = @array? and regexs         


Author: Winston
Date: Dec 6, 2006 13:25

Is possible to create an array from an escalar? $var = alfafla;
I want to know if any $var is palindrome. And seems really difficult
using regex, but is very easy if it would be an array.

And what about if I want to check if $var2 has all $var's letters? ($var
=~ /[$var2]+/ ?

And if $var has a letter many times in any position? $var =~
/($letter)*\1/ ?

What is the best book for regular expressions?
20 Comments
  Perl equivalents of MS' ASP.NET2/3         


Author: Ted
Date: Dec 6, 2006 13:03

I have been using Perl, but I also use C++ and Java, I know VB, and I
am looking at C#. I have MS' Visual Studio 2005. As some of you may
know, version 3 of .NET was just recently released.

There is no doubt that .NET is an interesting and useful framework. I
see it as just another framework for developing applications, like
wxWidgets or Borland's VCL: just another library one might choose to
use. On first glance, though, it does seem impressive and well
designed to reduce the amount of code one needs to write in order to
implement a given application.

I am wondering, though, if there is a comparable library or application
framework for Perl. I have Apache and Perl installed on Windows XP
(along with a number of other servers, including application servers
and database servers). My latest application, deployed just a couple
weeks ago, was a mix of Perl and SQL.
Show full article (1.43Kb)
3 Comments
  wxperl wxcombobox ;; disable system "error sound"         


Author: scooterm
Date: Dec 6, 2006 12:12

Simple question. When using the wxComboBox control, the system produces
an annoying "system error sound" when the user presses the RETURN or
TAB key while the control is focused.

I simply wish to disable this sound for this specific control. Can
anyone suggest a solution?

TIA
no comments
  FAQ 2.11 Perl Books         


Author: PerlFAQ Server
Date: Dec 6, 2006 12:03

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

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

2.11: Perl Books

A number of books on Perl and/or CGI programming are available. A few of
these are good, some are OK, but many aren't worth your money. There is
a list of these books, some with extensive reviews, at
http://books.perl.org/ . If you don't see your book listed here, you can
write to perlfaq-workers@perl.org .

The incontestably definitive reference book on Perl, written by the
creator of Perl, is Programming Perl:

Programming Perl (the "Camel Book"):
by Larry Wall, Tom Christiansen, and Jon Orwant
ISBN 0-596-00027-8 [3rd edition July 2000]
http://www.oreilly.com/catalog/pperl3/
(English, translations to several languages are also available)
Show full article (7.71Kb)
no comments
  @array=@_[2..$#_-1];         


Author: Winston
Date: Dec 6, 2006 10:41

Why this is not work?
@array=@_[2..$#_-1];

I give to a function 2 variables and 1 array, y need to take the whole
array.
5 Comments
  HASH         


Author: Winston
Date: Dec 6, 2006 08:58

I need to *MAKE* some subrutines for search inside a hash.
I wonder what is the best for this.

For example, I have a hash with names and ages. And I need to make some
searches using regular expressions...

sub a_option {
%%hash = @_;
print "Letter? ";
chomp($letter = );
@names = keys(%%hash);
$found=0;
foreach $name (@names) {
if ($name =~ /^$letter/) {
print "Name: $name\t\t Age:$hash{$name}";
$encontrado++;
}
}
}

And the same for b_option, c_option, etc...
Is this ok? Or is a little bit ridiculous?
Show full article (0.73Kb)
8 Comments
 
1 2 3