problem with module install about Shell::POSIX::Select

2008-07-29 Thread Jiancong
Hi all: When I install the “Shell-POSIX-Select” module into my system, I got the following error message from screen. After I searched on internet, I found any useful messages to resolve it. Could you tell me how to resolve it or where to find some useful messages. Thanks a lot. PERL_

Question about lwp-rget

2008-07-29 Thread bdy
If I use lwp-rget to retrieve a Web site, will it retrieve new pages added that may not be linked to? For example, the site www.123.com is composed of 10 pages, each of which is accessible through links on the site. But, two pages are added in the span of three days. www.123.com/fourteen-five.js

Regular expression: How to determine wether entry is a number?

2008-07-29 Thread Jan-Henrik
Dear Group, I'm new to Perl and I have a simple question: I ask for the entry of a number vie : #!/usr/bin/perl -w use strict; my $foo; print "Enter number: "; $foo = ; comp($foo); Now I would like to check wethe

Re: rand()

2008-07-29 Thread Randal L. Schwartz
> "peng" == peng kyo <[EMAIL PROTECTED]> writes: peng> You may need srand before the rand function. Not in any version of Perl released in the past 8 years or so. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> http://www.stonehenge.com/mer

Re: Regular expression: How to determine wether entry is a number?

2008-07-29 Thread Paul Lalli
On Jul 29, 8:46 am, [EMAIL PROTECTED] (Jan-Henrik) wrote: > I'm new to Perl and I have a simple question: Yes, but unfortunately it doesn't have a simple answer :-/ > I ask for the entry of a number vie : > > > #!/usr/bin/perl -w > use strict; > > my $

Re: Regular expression: How to determine wether entry is a number?

2008-07-29 Thread Paul Johnson
On Tue, Jul 29, 2008 at 05:46:09AM -0700, Jan-Henrik wrote: > Now I would like to check wether the user really entered a number and > not letters. What would a check like that look like? A regular > expression like this: > > unless ($foo =~ /[a-zA-Z\D+][^.]

Re: Regular expression: How to determine wether entry is a number?

2008-07-29 Thread Aruna Goke
Jan-Henrik wrote: Dear Group, I'm new to Perl and I have a simple question: I ask for the entry of a number vie : #!/usr/bin/perl -w use strict; my $foo; print "Enter number: "; $foo = ; comp($foo); Now I would

Re: Regular expression: How to determine wether entry is a number?

2008-07-29 Thread John W. Krahn
Jan-Henrik wrote: Dear Group, I'm new to Perl and I have a simple question: I ask for the entry of a number vie : #!/usr/bin/perl -w use strict; my $foo; print "Enter number: "; $foo = ; comp($foo); Now I would

Re: Regular expression: How to determine wether entry is a number?

2008-07-29 Thread Paul Lalli
On Jul 29, 12:21 pm, [EMAIL PROTECTED] (Aruna Goke) wrote: > Jan-Henrik wrote: > > Dear Group, > > > I'm new to Perl and I have a simple question: > > > I ask for the entry of a number vie : > > > > > #!/usr/bin/perl -w > > use strict; > > > my $foo; > > pri

Re: Read File Problem

2008-07-29 Thread Dr.Ruud
Rob Dixon schreef: > my $contents = do { > open my $fh, $source_file or die $!; > local $/; > <$fh>; > }; That has the file's contents in memory twice. This is leaner: my $contents; { open my $fh, $source_file or die $!; local $/; $contents = <$fh>; }; -- Affi

Checking to see if file exists.

2008-07-29 Thread tvadnais
I am totally confounded by what appears to be a bug in the "does file exist" functionality. Here is the code as it stands now: my $tmpfile = substr ($file, 0, index($file, ".pgp")); print cwd(); ## debug code: to make sure we're in the correct directory chomp($tmpfile); ## debug code

Re: Checking to see if file exists.

2008-07-29 Thread Kenneth Wolcott
On Tue, Jul 29, 2008 at 2:32 PM, tvadnais <[EMAIL PROTECTED]> wrote: > I am totally confounded by what appears to be a bug in the "does file > exist" > functionality. > > > > Here is the code as it stands now: > > my $tmpfile = substr ($file, 0, index($file, ".pgp")); > > print cwd(); ## d

Re: Regular expression: How to determine wether entry is a number?

2008-07-29 Thread Jan-Henrik
On 29 juil, 14:46, [EMAIL PROTECTED] (Jan-Henrik) wrote: > Dear Group, > > I'm new to Perl and I have a simple question: > > I ask for the entry of a number vie : > > > #!/usr/bin/perl -w > use strict; > > my $foo; > print "Enter number: "; > $foo = ; > comp

Re: getting process id under NT

2008-07-29 Thread epanda
Hi HappyTown I have seen your web link but I don't think it can show me the PID if I give the name of an existing and running Win NT application. On 28 juil, 05:24, [EMAIL PROTECTED] (Happytown) wrote: > On Jul 26, 3:14 am, [EMAIL PROTECTED] (Epanda) wrote: > > > Hi, > > > I would like to know i

Re: Regular expression: How to determine wether entry is a number?

2008-07-29 Thread Jan-Henrik
On 29 juil, 17:40, [EMAIL PROTECTED] (Paul Lalli) wrote: > On Jul 29, 8:46 am, [EMAIL PROTECTED] (Jan-Henrik) wrote: > > > I'm new to Perl and I have a simple question: > > Yes, but unfortunately it doesn't have a simple answer :-/ > > > I ask for the entry of a number vie : > > > -

Re: beginners Digest 29 Jul 2008 21:32:20 -0000 Issue 3524

2008-07-29 Thread Tim Maher
Jiancong, Sorry to hear that you're having trouble using my module, Shell::POSIX::Select. As stated in the BUGS section at the end of the module's documentation, various versions of Text::Balanced and/or Filter::Simple (on which Select depends) have limitations that can affect the module's source-

Re: Regular expression: How to determine wether entry is a number?

2008-07-29 Thread Jan-Henrik
On 29 Jul., 17:40, [EMAIL PROTECTED] (Paul Lalli) wrote: > On Jul 29, 8:46 am, [EMAIL PROTECTED] (Jan-Henrik) wrote: > > > I'm new to Perl and I have a simple question: > > Yes, but unfortunately it doesn't have a simple answer :-/ > > > I ask for the entry of a number vie : > > > -

RE: Checking to see if file exists.

2008-07-29 Thread tvadnais
Ken, Thank you for your quick response. I changed the code from: if (-e $tmpfile) { to: if (-f $tmpfile) { and got the same results. (The test failed.) (-e substr ($file, 0, index($file, ".pgp"))), (-e $tmpfile), (-e "$tmpfile"), (-e "$RDYdir\/$tmpfile") (-f $tmpfile) (-e "F0715PAY.TXT") <

RE: Checking to see if file exists.

2008-07-29 Thread tvadnais
Somehow my response got mangled a tad. I'm editing the middle part: .. and got the same results. (The test failed.) I've tried: (-e substr ($file, 0, index($file, ".pgp"))), (-e $tmpfile), (-e "$tmpfile"), (-e "$RDYdir\/$tmpfile"), (-f $tmpfile), (-e "F0715PAY.TXT") <--- This is the on

RE: Checking to see if file exists.

2008-07-29 Thread Mr. Shawn H. Corey
On Tue, 2008-07-29 at 19:06 -0700, tvadnais wrote: > Here is the true code if that helps: > I've tried: > > foreach my $file ( @currset ) > { > my $tmpstr = substr ($file, 0, index($file, ".pgp")); > print ("trying to delete $tmpstr \n"); > ## pgp will core dump if there's already an unen

RE: Checking to see if file exists.

2008-07-29 Thread tvadnais
Oops, thank you for catching that... I haven't gotten that far in my debugging. Unfortunately, my problem was with the "if (-e $filename)" always returning false. In the code I'm testing, I have the pgp commented out, because I can't actually unencrypt the files because pgp can only be run by roo

RE: Checking to see if file exists.

2008-07-29 Thread Mr. Shawn H. Corey
On Tue, 2008-07-29 at 19:49 -0700, tvadnais wrote: > Oops, thank you for catching that... I haven't gotten that far in my > debugging. > > Unfortunately, my problem was with the "if (-e $filename)" always returning > false. In the code I'm testing, I have the pgp commented out, because I > can't

Re: getting process id under NT

2008-07-29 Thread Ron Bergin
On Jul 29, 9:12 am, [EMAIL PROTECTED] (Epanda) wrote: > Hi HappyTown > > I have seen your web link but I don't think it can show me the PID if > I give the name of an existing and running Win NT application. > > On 28 juil, 05:24, [EMAIL PROTECTED] (Happytown) wrote: > > > On Jul 26, 3:14 am, [EMAI

reading a few bytes into a file

2008-07-29 Thread Scott Haneda
Hello, I have this small C app that someone wrote for me ages ago, and am tired of it breaking every time I move it around to various systems, I will include it below. I am hoping I can do this in perl, as a one liner, were it will read a the first 4 bytes of a file, grab 4 bytes out of the