AW: TCP/IP client

2009-06-09 Thread Thomas Bätzler
Octavian Rasnita wrote: > I was hoping that I could find a module that allows me to do something > like: > > use The::Module; > > my $client = The::Module->new(PeerAddr => 'localhost:9000'); [...] Use Net::Telnet. From ist description: "You're not familiar with sockets and you want a simple wa

Re: TCP/IP client

2009-06-09 Thread Octavian Rasnita
From: "Chas. Owens" 2009/6/9 Octavian Râşniţă : Hi, I need to create a TCP/IP client that connects to a server which accepts messages made from 3 parts: - a static start string of 9 bytes; - the body (that can have a variable length) - a static string of 9 bytes. ...and then it gives a respons

Re: CGI

2009-06-09 Thread Owen
> > Hello, > >> On Mon, 2009-06-08 at 23:38 -0700, Irfan Sayed wrote: >> >> From: Owen >> To: Irfan Sayed >> Cc: beginners@perl.org >> Sent: Tuesday, June 9, 2009 12:03:49 PM >> Subject: Re: CGI >> >> >> > Hi ALL, >> > >> > i have written sample cgi script in per

Re: CGI

2009-06-09 Thread Greg Eldridge
Hello, > On Mon, 2009-06-08 at 23:38 -0700, Irfan Sayed wrote: > > From: Owen > To: Irfan Sayed > Cc: beginners@perl.org > Sent: Tuesday, June 9, 2009 12:03:49 PM > Subject: Re: CGI > > > > Hi ALL, > > > > i have written sample cgi script in perl. here it is >

Re: localtime

2009-06-09 Thread John W. Krahn
Rick wrote: below is working code but is there way to shorten this code in more perlish way? my($DAY, $MONTH , $YEAR ) = (localtime)[3,4,5]; my $day = sprintf("%02d",$DAY); my $month = sprintf("%02d", ($MONTH + '1')); my $year = sprintf("%04d", ($YEAR + '1900')); Why are you using a strin

Re: localtime

2009-06-09 Thread Tech W.
use POSIX's function strftime: perl -le 'use POSIX qw/strftime/;$time = strftime "%Y%m%d",localtime; print $time' --- On Wed, 10/6/09, Rick wrote: > From: Rick > Subject: localtime > To: "Perl Beginners" > Received: Wednesday, 10 June, 2009, 9:55 AM > below is working code but is there > w

localtime

2009-06-09 Thread Rick
below is working code but is there way to shorten this code in more perlish way? my($DAY, $MONTH , $YEAR ) = (localtime)[3,4,5]; my $day = sprintf("%02d",$DAY); my $month = sprintf("%02d", ($MONTH + '1')); my $year = sprintf("%04d", ($YEAR + '1900')); my $current_dir = join('', $year, $mont

Re: CGI scripting

2009-06-09 Thread Eko Budiharto
Irfan, please read the readme or the user guide. I think you should modify to specify the virtual directory name on the apache. Irfan Sayed wrote: *From:* Eko Budiharto *To:* Irfan Sayed *Cc:* beginners@perl.org *Sent

Re: TCP/IP client

2009-06-09 Thread Chas. Owens
2009/6/9 Octavian Râşniţă : > Hi, > > I need to create a TCP/IP client that connects to a server which accepts > messages made from 3 parts: > - a static start string of 9 bytes; > - the body (that can have a variable length) > - a static string of 9 bytes. > > ...and then it gives a response that

TCP/IP client

2009-06-09 Thread Octavian Râşniţă
Hi, I need to create a TCP/IP client that connects to a server which accepts messages made from 3 parts: - a static start string of 9 bytes; - the body (that can have a variable length) - a static string of 9 bytes. ...and then it gives a response that I need to get. I've searched the CPAN fo

Re: Efficiently going through results

2009-06-09 Thread Jim Gibson
On 6/9/09 Tue Jun 9, 2009 1:24 AM, "Dave Tang" scribbled: > Hello, > > I have a problem, which I have put into an analogy. > > Suppose a parent has 11 children. These children like chocolate. If 9 or > more of the 11 children from the same parent like a particular chocolate, > the parent will

AW: Efficiently going through results

2009-06-09 Thread Thomas Bätzler
Dave Tang asked: > my %result = (); > foreach my $parent (keys %listOfParent){ > my $chocolate = ''; > foreach my $child (keys %{$listOfParent}{$parent}){ >foreach ($listOfParent{$parent}{$child}){ > $chocolate = $_; Why not "foreach my $chocolate ($listOfParent{$paren

Mac::Glue with Adobe Illustrator

2009-06-09 Thread Beau E. Cox
HI - Has anyone on this list used Mac::Glue, specifically to script Adobe Illustrator? I have been trying and trying to get it to work, alas, no joy. Simple things (start Illustrator, activate, quit, etc) work, but as soon as I start using parameters I run into a brick wall. This script to open

Efficiently going through results

2009-06-09 Thread Dave Tang
Hello, I have a problem, which I have put into an analogy. Suppose a parent has 11 children. These children like chocolate. If 9 or more of the 11 children from the same parent like a particular chocolate, the parent will like the chocolate. I want to find out what types of chocolate each