Re: Reading file from web into a hash

2010-02-16 Thread John W. Krahn
Herb wrote: Hi All, Hello, I am a perl novice and am having some trouble with formatting a web file to put into a hash. I have the following code: #!/usr/bin/perl -w use LWP::Simple; #use strict; sub sws { my $file = shift; You should probably pass the filehandle instead of the

Re: Howto catch a signal and continue afterwards

2010-02-16 Thread C.DeRykus
On Feb 16, 5:40 am, shawnhco...@gmail.com (Shawn H Corey) wrote: > C.DeRykus wrote: > > On Feb 15, 12:35 pm, shawnhco...@gmail.com (Shawn H Corey) wrote: > >> Normally a program continues but if it is waiting or sleeping, it > >> continues after the command.  You have to redo the command until it >

Reading file from web into a hash

2010-02-16 Thread Herb
Hi All, I am a perl novice and am having some trouble with formatting a web file to put into a hash. I have the following code: #!/usr/bin/perl -w use LWP::Simple; #use strict; sub sws { my $file = shift; while (!eof(FH)) { $line = ; push @temp

Re: make an alias to function

2010-02-16 Thread Uri Guttman
> "SHC" == Shawn H Corey writes: SHC> Jeff Peng wrote: >> Hi, >> >> I have a module, and I wanted to make an alias with a function in that module. >> >> package abc; >> SHC> # declare the sub without defining it SHC> sub init_squid_for_reverseproxy; >> my $obj = abc-

Re: Howto catch a signal and continue afterwards

2010-02-16 Thread Shawn H Corey
C.DeRykus wrote: > On Feb 15, 12:35 pm, shawnhco...@gmail.com (Shawn H Corey) wrote: >> Normally a program continues but if it is waiting or sleeping, it >> continues after the command. You have to redo the command until it >> terminates correctly. Example: waiting for a child process: >> >> my

Re: make an alias to function

2010-02-16 Thread Shawn H Corey
Jeff Peng wrote: > Hi, > > I have a module, and I wanted to make an alias with a function in that module. > > package abc; > # declare the sub without defining it sub init_squid_for_reverseproxy; > { # make an alias to another function >no strict 'refs'; >*{__PACKAGE__::init_squid_for_

Re: Howto catch a signal and continue afterwards

2010-02-16 Thread C.DeRykus
On Feb 15, 12:35 pm, shawnhco...@gmail.com (Shawn H Corey) wrote: > Matthias Meyer wrote: > > Hi group, > > > I try to catch a signal, write out some statistics about my running > > perl program and continue afterwards with the program. > > > use strict; > > no  utf8; > > use MyProgram::Lib; > > us

Re: Howto catch a signal and continue afterwards

2010-02-16 Thread C.DeRykus
On Feb 15, 11:59 am, matthias.me...@gmx.li (Matthias Meyer) wrote: > Hi group, > > I try to catch a signal, write out some statistics about my running > perl program and continue afterwards with the program. > > use strict; > no  utf8; > use MyProgram::Lib; > use Encode; > use Socket; > use File::P