recognize input languages

2013-03-07 Thread Ken Peng
How can Perl recognize user's input languages? for example, if the message is in Chinese, the character encode will be GB2312. if it's in latin, the encode will be iso-8859-1, etc. Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...

Re: Return values more than 256?

2013-03-07 Thread Brandon McCaig
On Thu, Mar 07, 2013 at 02:24:58PM -0800, John W. Krahn wrote: > Or, instead of the three argument open, use the list option and you > won't need quotes: > > my $pid = open my $trexe, '-|', $tr, $tr_params > or die "Could not start TestRunner. $!"; Good catch. :) I didn't think that o

Re: Return values more than 256?

2013-03-07 Thread John W. Krahn
Brandon McCaig wrote: On Thu, Mar 07, 2013 at 10:21:40AM +0100, WFB wrote: Hi, List, Hello, To test our software I use perl to start it several times. My perl script gather some information and start then the program with different parameters. It works very well, but I have a problem with t

Re: Net::DNS

2013-03-07 Thread shawn wilson
On Thu, Mar 7, 2013 at 2:04 PM, shawn wilson wrote: > On Thu, Mar 7, 2013 at 12:43 PM, Lawrence Statton wrote: >> On 03/07/2013 11:29 AM, Lawrence Statton wrote: >>> >>> On 03/07/2013 11:00 AM, shawn wilson wrote: However, when I @EXPORT this function from a module, I get this: Can

Re: Net::DNS

2013-03-07 Thread shawn wilson
On Thu, Mar 7, 2013 at 12:29 PM, Lawrence Statton wrote: > On 03/07/2013 11:00 AM, shawn wilson wrote: >> >> However, when I @EXPORT this function from a module, I get this: >> Can't call method "pre" on an undefined value at lib/Misc.pm line 45, >> <> line 723793. > > if (my $answer = $packet->

Re: Return values more than 256?

2013-03-07 Thread WFB
On 7 March 2013 16:05, Brandon McCaig wrote: > On Thu, Mar 07, 2013 at 10:21:40AM +0100, WFB wrote: > > Hi, List, > > Hello, > > > To test our software I use perl to start it several times. My > > perl script gather some information and start then the program > > with different parameters. > > >

Re: Net::DNS

2013-03-07 Thread shawn wilson
On Thu, Mar 7, 2013 at 11:40 AM, Lawrence Statton wrote: > On 03/07/2013 10:21 AM, shawn wilson wrote: >> >> use Data::Dumper; >> use Net::DNS::Resolver; >> >> my $dns = Net::DNS::Resolver->new; >> >> print rev_ip('8.8.8.8') . "\n"; >> >> sub rev_ip >> { >>my ($ip) = @_; >> >>my $packet =

Re: Net::DNS

2013-03-07 Thread Lawrence Statton
On 03/07/2013 10:21 AM, shawn wilson wrote: use Data::Dumper; use Net::DNS::Resolver; my $dns = Net::DNS::Resolver->new; print rev_ip('8.8.8.8') . "\n"; sub rev_ip { my ($ip) = @_; my $packet = $dns->search($ip); my @authority = $packet->authority; my $string = join ', ', map { $_

Net::DNS

2013-03-07 Thread shawn wilson
What am I doing wrong here? I'm obviously not understanding what object is being returned by $packet. use strict; use warnings; use Data::Dumper; use Net::DNS::Resolver; my $dns = Net::DNS::Resolver->new; print rev_ip('8.8.8.8') . "\n"; sub rev_ip { my ($ip) = @_; my $packet = $dns->searc

Re: Return values more than 256?

2013-03-07 Thread Brandon McCaig
On Thu, Mar 07, 2013 at 10:05:56AM -0500, Brandon McCaig wrote: > Apparently Windows supports 32-bit integers... The Web suggests > that if you want to get full 32-bit integers on Windows then you > should use the Win32::Process module instead of open. It's not > portable, but at least it will do w

Re: Return values more than 256?

2013-03-07 Thread Brandon McCaig
On Thu, Mar 07, 2013 at 10:21:40AM +0100, WFB wrote: > Hi, List, Hello, > To test our software I use perl to start it several times. My > perl script gather some information and start then the program > with different parameters. > > It works very well, but I have a problem with the return value

Return values more than 256?

2013-03-07 Thread WFB
Hi, List, First thank you for the help you provide. I follow this list quite a time and learned a lot. My problem, or question, respectively: To test our software I use perl to start it several times. My perl script gather some information and start then the program with different parameters. It