Re: freeze after

2007-06-03 Thread Mumia W.
On 06/03/2007 01:23 AM, Ryan wrote: Hello. This is my first post to the List. I am just getting my feet wet with perl, my first programming language. Welcome to the list Ryan. I'm running perl 5.8.4 on Libranet linux, a now-defunct distro based on out-of-date Debian (Sarge or before, I thi

Re: freeze after

2007-06-03 Thread Chas Owens
On 6/3/07, Ryan <[EMAIL PROTECTED]> wrote: snip open F, "JunkTestText.txt"; local $/ = "\*\*\*"; my @sections = ; close F; snip When executed, it runs up to and including asking me for input from the terminal. When I enter a value for $patient (a 7-digit number) and press enter, nothing happen

GMP for Math::BigInt not working ?

2007-06-03 Thread David Unric
Any idea why the following code falls back to slow standard Perl implementation of BigInt module instead of highspeed GMP being used ? (no warnings, GMP module _is_ installed) --- use Math::BigInt lib => 'GMP'; my $fac = Math::BigInt->new('4000'); print $fac->bfac(),"\n"; --

Paths, Spaces, Getopt::Long

2007-06-03 Thread Mike Lesser
Hi all. I have a problem that _must_ have a very simple solution (that I can't find). I use the module Getopt::Long to read arguments, one of which is a file path that may have spaces. The path string that is returned from Getopt has spaces without escape chars. The string seems to be fine

Re: Paths, Spaces, Getopt::Long

2007-06-03 Thread Tom Phoenix
On 6/3/07, Mike Lesser <[EMAIL PROTECTED]> wrote: I use the module Getopt::Long to read arguments, one of which is a file path that may have spaces. The path string that is returned from Getopt has spaces without escape chars. The string seems to be fine for Perl use, but not so great for other

Re: GMP for Math::BigInt not working ?

2007-06-03 Thread Mumia W.
On 06/03/2007 08:40 AM, David Unric wrote: Any idea why the following code falls back to slow standard Perl implementation of BigInt module instead of highspeed GMP being used ? (no warnings, GMP module _is_ installed) --- use Math::BigInt lib => 'GMP'; my $fac = Math::BigIn

Re: GMP for Math::BigInt not working ?

2007-06-03 Thread Mumia W.
On 06/03/2007 10:42 AM, Mumia W. wrote: [...] the docs say that the Math::GMP module is not used by Math::BigInt::GMP. Math::BigInt::GMP uses the binary GMP library if it's installed, so perhaps you could look there. Duh. Of course you have the binary GMP library installed--otherwise Math

Test Operator -M

2007-06-03 Thread Rodrick Brown
I see this used a lot but never really understod it the documentation also seems very vague. Anyone care to explain the following: -M OPERAND Returns the age of OPERAND in days when the program started. Thanks. -- Rodrick R. Brown http://www.rodrickbrown.com -- To unsubscribe, e-mail: [EMAIL P

Re: Paths, Spaces, Getopt::Long

2007-06-03 Thread Chas Owens
On 6/3/07, Mike Lesser <[EMAIL PROTECTED]> wrote: snip I have to assume that paths can be converted easily for use in shells and such, without resorting to RegEx. Any ideas? snip Aside from the multi argument version of system that Tom has already mentioned, the bigger question is "Why are you

Re: Test Operator -M

2007-06-03 Thread Chas Owens
On 6/3/07, Rodrick Brown <[EMAIL PROTECTED]> wrote: I see this used a lot but never really understod it the documentation also seems very vague. Anyone care to explain the following: -M OPERAND Returns the age of OPERAND in days when the program started. snip perl -le 'print "$_ is ", int -M,

Re: Test Operator -M

2007-06-03 Thread Tom Phoenix
On 6/3/07, Rodrick Brown <[EMAIL PROTECTED]> wrote: I see this used a lot but never really understod it the documentation also seems very vague. Anyone care to explain the following: -M OPERAND Returns the age of OPERAND in days when the program started. Here's a helpful page: http://perl

Fwd: Paths, Spaces, Getopt::Long

2007-06-03 Thread Mike Lesser
Well I'm not sure. I may be explaining this badly. I'll go thru all the details in case it helps. The path I pass when I'm executing the script is escaped, which I assume is correct. Once that path is read by Getopt, I print it and, voila, no escapes, just nice-to-read spaces. This pa

Fwd: Paths, Spaces, Getopt::Long

2007-06-03 Thread Mike Lesser
Begin forwarded message: From: Mike Lesser <[EMAIL PROTECTED]> Date: June 3, 2007 3:48:56 PM EDT To: "Chas Owens" <[EMAIL PROTECTED]> Subject: Re: Paths, Spaces, Getopt::Long On Jun 3, 2007, at 1:59 PM, Chas Owens wrote: On 6/3/07, Mike Lesser <[EMAIL PROTECTED]> wrote: snip I have to assum

Re: Paths, Spaces, Getopt::Long

2007-06-03 Thread Mike Lesser
On Jun 3, 2007, at 1:59 PM, Chas Owens wrote: On 6/3/07, Mike Lesser <[EMAIL PROTECTED]> wrote: snip I have to assume that paths can be converted easily for use in shells and such, without resorting to RegEx. Any ideas? snip Aside from the multi argument version of system that Tom has alread

Re: Paths, Spaces, Getopt::Long

2007-06-03 Thread Chas Owens
On 6/3/07, Mike Lesser <[EMAIL PROTECTED]> wrote: snip Then I attempted to use Tidy, sans HTML::Tidy, through Shell. The HTML::Tidy lib won't work on my system. So, I have been futzing with tidy and I'v e discovered that tidy and simple commands like cd fail, most likely because of the spaces in

Re: Paths, Spaces, Getopt::Long

2007-06-03 Thread Chas Owens
On 6/3/07, Chas Owens <[EMAIL PROTECTED]> wrote: snip my $tidy = "/usr/bin/tidy"; my @tidy_args = qw(--foo --bar -- example); my $path = get_path(); my $file = $path . get_file(); system($tidy, @tidy_args, $file); Opps, forgot the error checking. system($tidy, @tidy_args, $file) or die qq(

Re: Paths, Spaces, Getopt::Long

2007-06-03 Thread Chas Owens
On 6/3/07, Chas Owens <[EMAIL PROTECTED]> wrote: On 6/3/07, Chas Owens <[EMAIL PROTECTED]> wrote: snip > my $tidy = "/usr/bin/tidy"; > my @tidy_args = qw(--foo --bar -- example); > my $path = get_path(); > my $file = $path . get_file(); > > system($tidy, @tidy_args, $file); Opps, forgot the erro

Re: Paths, Spaces, Getopt::Long

2007-06-03 Thread Mike Lesser
Okay, I eliminated the tidy with some more robust regex. D'oh! Case closed! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Paths, Spaces, Getopt::Long

2007-06-03 Thread John W. Krahn
Chas Owens wrote: > On 6/3/07, Chas Owens <[EMAIL PROTECTED]> wrote: >> On 6/3/07, Chas Owens <[EMAIL PROTECTED]> wrote: >> snip >> > my $tidy = "/usr/bin/tidy"; >> > my @tidy_args = qw(--foo --bar -- example); >> > my $path = get_path(); >> > my $file = $path . get_file(); >> > >> > system($tidy,

Re: freeze after

2007-06-03 Thread Ryan
Now I think I understand better, thanks. The idea of changing the record separator to something else I borrowed from another thread on the list archives, which dealt with a similar problem to mine. I have large text files that contain multi-line, multi-paragraph sections that pertain to a var