[EMAIL PROTECTED] wrote:
>
> Hello Everyone,
Hello,
> I am a Perl newbie trying to learn as much Perl as I can. I am trying to
> combine specific array elements into one single array element so that I can
> write
> to an Excel cell, where all the data will fit.
>
> For instance I have,
>
> ar
Hello all,
I have perl 5.6.0 on my Mac OS X. I'd like to install libnet.
However, when I try to use cpan, it wants to automagically upgrade my
perl to 5.8.2. All I really want is Net::FTP. What is my best course
of action:
- upgrade to perl 5.8.2 and then libnet-1.17
- upgrade to some othe
Hi,
I wrote a script to update some websites based on a template system. The script starts
asking the user to choose a site to update:
[script preamble omitted]
my ($update_path, $site_root, $site_type);
my %choice_hash = (
1 => 'janeden',
2 => 'gargnano',
3 => 'breskens',
);
Dan Muey wrote:
>> Thanks to everyone who helped me with this one, I had a
>> deadline to meet that is now met.
>>
>> It was a missing ~ and me failing to use s on the end of my pattern
>>
>> may be of use to other users but for some reason my Linux
>> server needs s///s; to match over newlin
Hi Yannick,
I hope you are still around.
http://www.faqs.org/faqs/unix-faq/faq/part3/section-1.html answers your quesiton.
Sergei
>Subject: How to get a dir creation time
>From: "Yannick Warnier" <[EMAIL PROTECTED]>
>To: "perl beginners list" <[EMAIL PROTECTED]>
>Date: Sun, 30 Nov 2003 18:
Jan Eden wrote:
>
> Hi,
Hello,
> I wrote a script to update some websites based on a template system. The
> script starts asking the user to choose a site to update:
>
> [script preamble omitted]
>
> my ($update_path, $site_root, $site_type);
>
> my %choice_hash = (
> 1 => 'janeden',
>
I am reading through a book on Objects and References and I don't
understand this statement:
$sum += $_ for split //;
I thought a FOR statement needed to be in braces. How is it being used
in this context?
--Paul
Paul Harwood said:
> I am reading through a book on Objects and References and I don't
> understand this statement:
>
> $sum += $_ for split //;
>
> I thought a FOR statement needed to be in braces. How is it being used
> in this context?
It means exactly the same as:
for (split //)
{
Paul Harwood wrote:
>
> I am reading through a book on Objects and References and I don't
> understand this statement:
>
> $sum += $_ for split //;
>
> I thought a FOR statement needed to be in braces. How is it being used
> in this context?
Hi Paul.
In this instance 'for' is working as a statem
Problem: Need to create a hash like data structure that contains the key as
an ip address. The dhcpd leases file contains all leases handed out and the
time they where assigned using UTC time. Using the epoch time stamp in the
access file and the ipaddress to get the actual host name of the machine
--As off Thursday, January 8, 2004 1:18 AM -0600, Robert Citek is
alleged to have said:
Hello all,
I have perl 5.6.0 on my Mac OS X. I'd like to install libnet.
However, when I try to use cpan, it wants to automagically upgrade
my perl to 5.8.2. All I really want is Net::FTP. What is my best
Dan Anderson wrote:
Is it possible to (easily) tell perl to kill itself and all children if
the script doesn't execute in x seconds?
to kill a script in itself you could use alarm($seconds)
If you really are serious about killed all forked children properly
write a function that will kill a
On Wed, 2004-01-07 at 20:39, Paul Harwood wrote:
> I am reading through a book on Objects and References and I don't
> understand this statement:
>
> $sum += $_ for split //;
FWIW, for is synonymous with foreach.
-Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-ma
I have implemented something similar using named pipes instead of sockets.
For send/receive type dialog, you may be better of trying EXPECT. It is
very easy to learn, and so cool to use.
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROT
Paul Kraus wrote:
>
> Problem: Need to create a hash like data structure that contains the key as
> an ip address. The dhcpd leases file contains all leases handed out and the
> time they where assigned using UTC time. Using the epoch time stamp in the
> access file and the ipaddress to get the act
> Dan Muey wrote:
>
> > Howdy list.
> > I'm trying to one lineify this:
> >
> > my $guts = $firstchoice || '';
> > if(!$guts && $use_second_choice_if_first_is_empty) {
> > $guts = $secondchoice;
> > }
> >
> > Basically
> > my $guts = $firstchoice || $secondchoic || '';
> > Would be perfect
> Dan Muey wrote:
>
> > BTW - I'm not really using these variable names, only using
> them here
> > ot help clarify my goal.
>
> Why not? They looked very good to me, at least in the
> context of the question at hand. One of the best aspects of
In context yes, but the really really long w
What is the difference. The only I see is that printf can take a filehandle?
But what use would that be.
Paul Kraus
---
PEL Supply Company
Network Administrator
---
800 321-1264 Toll Free
216 267-5775 Voice
216 267-6176 Fax
www.pelsupply.com
-
> What is the difference. The only I see is that printf can
One difference is printf prints it's output and sprintf returns it';s value.
printf ...
my $formatted_goodies = sprintf ...
> take a filehandle? But what use would that be.
>
To format the contents of it. For instance, you might hav
>
> What is the difference. The only I see is that printf can take a
filehandle?
> But what use would that be.
>
The filehandle tells printf where to print the result, aka which
filehandle, by default STDOUT. Which doesn't have a purpose with
sprintf since it returns its value...
http://dan
> > What is the difference. The only I see is that printf can
>
> One difference is printf prints it's output and sprintf returns it';s
value.
>
> printf ...
> my $formatted_goodies = sprintf ...
>
> > take a filehandle? But what use would that be.
> >
>
> To format the contents of it. For
> > > What is the difference. The only I see is that printf can
> >
> > One difference is printf prints it's output and sprintf
> returns it';s
> value.
> >
> > printf ...
> > my $formatted_goodies = sprintf ...
> >
> > > take a filehandle? But what use would that be.
> > >
> >
> > To format
Wiggins D Anconia wrote:
>
> Notice the difference in the docs:
>
> printf FILEHANDLE FORMAT, LIST
> printf FORMAT, LIST
>
> In the first there is NO comma following the filehandle, this means it
> is interpreted in a different manner than the rest of the argument list,
> or probably to be more pre
Hello Dzhuo,
Your server code will not be able to handle multiple clients. You need to
undefine $file after closing the client connection. That is:
close(FILE) if($file);
close($client);
$file = undef;#<-- you omitted this line
}
__END__
__
Wi
Wiggins D Anconia wrote:
>
> Notice the difference in the docs:
>
> printf FILEHANDLE FORMAT, LIST
> printf FORMAT, LIST
>
> In the first there is NO comma following the filehandle, this means it
> is interpreted in a different manner than the rest of the argument list,
> or probably to be more pre
> Wiggins D Anconia wrote:
> >
> > Notice the difference in the docs:
> >
> > printf FILEHANDLE FORMAT, LIST
> > printf FORMAT, LIST
> >
> > In the first there is NO comma following the filehandle, this means it
> > is interpreted in a different manner than the rest of the argument list,
> > or p
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (William Ampeh) writes:
>
>Sorry I forgot to include this in my earlier question:
>
>Beside perldebug, and the usual (use strict and perl -c).
You apppear to have a broad definition of "debugger" that
extends beyond the customary trace/inspect too
William Ampeh wrote:
> Your server code will not be able to handle multiple clients. You need to
> undefine $file after closing the client connection. That is:
>
>
> close(FILE) if($file);
> close($client);
> $file = undef;#<-- you omitted this line
> }
good catch.
On Jan 8, 2004, at 7:45 AM, Dan Muey wrote:
[..]
Except I need to do this to about ten variabels all in a row.
Which gives me 10 lines with Bob's way and 40 with my very
first example. Boo for that! :)
[..]
Have you thought about a simplification process?
One of the tricks I do is say
my ($var1,$
> "Dan" == Dan Anderson <[EMAIL PROTECTED]> writes:
Dan> On Wed, 2004-01-07 at 20:39, Paul Harwood wrote:
>> I am reading through a book on Objects and References and I don't
>> understand this statement:
>>
>> $sum += $_ for split //;
Dan> FWIW, for is synonymous with foreach.
Syntactical
> On Jan 8, 2004, at 7:45 AM, Dan Muey wrote:
> [..]
> >
> > Except I need to do this to about ten variabels all in a row. Which
> > gives me 10 lines with Bob's way and 40 with my very first example.
> > Boo for that! :)
> >
> [..]
>
> Have you thought about a simplification process?
> One of t
Wow just tested that for (@array) do something.
I didn't think that would work.
So there is no difference as far as the compiler is concerned with for and
foreach? Why bother having both then?
Paul Kraus
---
PEL Supply Company
Network Administrator
> -Original Messag
On Jan 8, 2004, at 10:38 AM, Dan Muey wrote:
[..]
The vars to be assigned ($var1, $var2,etc...) come from a
database query so they are handled already earlier. So how
they are declared are irrelevant to the issue. (Yes they must be
initialized for a warnings safe environment and they are, just
assu
> "Paul" == Paul Kraus <[EMAIL PROTECTED]> writes:
Paul> Wow just tested that for (@array) do something.
Paul> I didn't think that would work.
Paul> So there is no difference as far as the compiler is concerned
Paul> with for and foreach? Why bother having both then?
So you can avoid typing
>
> I think I better see the context at this point.
> note, as I presume you did
The issue is resolved, but for the die hards here goes...
I'm wanted to figure out my method of attack before I did the whole
thing but here is an example that will illustrate the basic idea hopefully:
#!/usr/bin/p
Hello David,
How would you convert your code to allow a bidirectional communication
between the clients and the server without the use of files or named pipes?
That is:
Client send a request to server, waits for server to respond,
Server processes client's request, and send response back to
How do I take advantage of this? I turn it on but I do not know how to get
it to display a help message. If I pass in -h --help it just ends. I am
assuming I need some kind of pod file but I am unknowledgeable on how to
write a pod file. Also how do I tell it what pod file to open?
Form perldoc Ge
> On Thu, 08 Jan 2004 09:44:31 -0500, [EMAIL PROTECTED] (Zentara)
> wrote:
>
> >On Wed, 7 Jan 2004 10:53:20 -0600, [EMAIL PROTECTED] (Dan Muey)
> >wrote:
> >
> >>Thanks! Even more to add to my look into list!
> >
> >Yeah upon futher thought, you probably could use the Tk::Canvas and
> >actually p
Paul Kraus wrote:
>
> Wow just tested that for (@array) do something.
> I didn't think that would work.
>
> So there is no difference as far as the compiler is concerned with for and
> foreach? Why bother having both then?
The practical reason is likely to be historical, but Larry would tell you a
William Ampeh wrote:
> Hello David,
>
>
> How would you convert your code to allow a bidirectional communication
> between the clients and the server without the use of files or named
> pipes?
>
> That is:
> Client send a request to server, waits for server to respond,
> Server processes clien
>
> How do I take advantage of this? I turn it on but I do not know how to get
> it to display a help message. If I pass in -h --help it just ends. I am
> assuming I need some kind of pod file but I am unknowledgeable on how to
> write a pod file. Also how do I tell it what pod file to open?
>
Paul Kraus wrote:
> What is the difference. The only I see is that printf can take a filehandle?
> But what use would that be.
All the use one could imagine. The printf function can print pretty much
anywhere. I believe that it preceded sprintf historically, but I wouldn't swear
to it. Many C
PerlDiscuss - Perl Newsgroups and mailing lists wrote:
Hi,
I am trying to write a script that will parse Microsoft outlook Inbox
to a .txt file. Please let me know if there a way to do that. Thanks in
advance for your help.
I know very little about this specific subject, but Mail::Box has so
On Thu, Jan 08, 2004 at 10:37:02PM -0500 Wiggins d'Anconia wrote:
> PerlDiscuss - Perl Newsgroups and mailing lists wrote:
> >Hi,
> >I am trying to write a script that will parse Microsoft outlook Inbox
> >to a .txt file. Please let me know if there a way to do that. Thanks in
> >advance for
44 matches
Mail list logo