Re: wildcard for unix????

2002-02-04 Thread Roger C Haslock
try chmod 0755 *.* - Roger - - Original Message - From: "Luinrandir Hernson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, February 03, 2002 8:54 PM Subject: wildcard for unix What is the global wildcard for unix? I'm trying to chmod 755 all f

Re: still not catching error

2002-02-02 Thread Roger C Haslock
You are testing the exit status of the system call, not the exit status of the rsh call which is in $?. You need $systemstatus=system(...); $rshstatus=$?; - Roger - - Original Message - From: "Bob Showalter" <[EMAIL PROTECTED]> To: "'Alex Harris'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]

Re: pulling file name into perl

2002-02-01 Thread Roger C Haslock
I don't think this is the right way to approach this. I suggest you look at opendir, readdir in perlfunc. opendir DIR, '/' or die "$0: no top level directory $!"; my @dirlist = readdir DIR; - Roger - - Original Message - From: "Russell Boyd" <[EMAIL PROTECTED]> To: ">" < <[EMAIL PROTECTE

Re: More Economic Use of Hash

2002-02-01 Thread Roger C Haslock
Do you want a lexical sort or a numeric sort? foreach my $key ( sort keys %freq ) # lexical foreach my $key ( sort ($a<=>$b) keys %freq ) # numeric - Roger - - Original Message - From: "Balint, Jess" <[EMAIL PROTECTED]> To: "'Roger C Haslock'&qu

Re: More Economic Use of Hash

2002-01-31 Thread Roger C Haslock
# Why not ... while( ) { @tmp = split( /\|/ ); if (exists $freq{$tmp[$table]}) { $freq{$tmp[$table]}++ } else { $freq{$tmp[$table]}=1 } $tot ++ } - Original Message - From: "Balint, Jess" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Th

Re: simple file question

2002-01-30 Thread Roger C Haslock
An alternative might be a tied hash, where the key is the email address. - Roger - - Original Message - From: "Chris Zampese" <[EMAIL PROTECTED]> To: "perl list" <[EMAIL PROTECTED]> Sent: Wednesday, January 30, 2002 2:10 AM Subject: simple file question Hello everyone, I have a variab

Re: STDOUT from system call

2002-01-20 Thread Roger C Haslock
open SYSOUTPUT, " system( $systemcall ) | " or die "$0 some complaint here $!"; $systreturn = or die "$0 no return from system call $!"; - Original Message - From: "Craig Inman" <[EMAIL PROTECTED]> To: "John W. Krahn" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, January 20

Re: I cant run perl from the dos command line

2002-01-20 Thread Roger C Haslock
What happens when perl -h ? - Original Message - From: "rabs" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 18, 2002 11:32 PM Subject: I cant run perl from the dos command line > > I am running ActivePerl 5.61.629 on Windows 98. It worked fine until > yesterday

Re: Pattern Matching - Remove Alpha

2002-01-20 Thread Roger C Haslock
Do you want to do this:- @numbers = split /[a-zA-Z]+/,$stat; # or @numbers = split /[^\d]+/,$stat; ? - Roger - - Original Message - From: "Michael Fowler" <[EMAIL PROTECTED]> To: "Tanton Gibbs" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, January 19, 2002 12:28 AM Subjec

Re: $~ ?

2002-01-20 Thread Roger C Haslock
Investigate English.pm, where the special symbols are given Engilsh names. Practise using it until bored! - Roger - - Original Message - From: "yun yun" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 19, 2002 3:40 PM Subject: $~ ? > I found in perl samples many str

Re: Finding a running process in Windows

2002-01-17 Thread Roger C Haslock
I have a copy of portix02b.zip which contains, inter alia, ps.exe. I don't have a copy of the URL where this came from, but it is an excellent set of the basic unix tools implemented for windows. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, Janu

Re: gt

2002-01-16 Thread Roger C Haslock
depending on the locale! - Original Message - From: "Hanson, Robert" <[EMAIL PROTECTED]> To: "'Naveen Parmar'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, January 15, 2002 7:16 PM Subject: RE: gt > Yes, but it is "greater than" in a character code sense. So "b" (ASCII

Re: silly beginners problem :)

2002-01-15 Thread Roger C Haslock
Your regexp is liiking for the string TITLE anywhere on a line, followed by zero or more whitespace characters, followed by one or more letters. Your example data has no characters following TITLE on that line, and so $1 is uninitialised. I imagine you want to suppress the imput record separator

Re: rand() function

2002-01-14 Thread Roger C Haslock
> > Another way to determine how randomly the rand() function is working is to plot > it sorted. A bad random function might predominate in a particular area, so > you want to see a straight diagonal line in this case, meaning the results are > spread throughout the range. (This is drifting off-

Re: rand() function

2002-01-13 Thread Roger C Haslock
Thank you. Were there any signs of lines? I vaguely remember the title of the paper - 'random numbers fall mainly on the planes'. Someone might know of it. - Roger - - Original Message - From: "Wagner-David" <[EMAIL PROTECTED]> To: "'Roger C Haslock&

Re: rand() function

2002-01-12 Thread Roger C Haslock
- From: "Wagner-David" <[EMAIL PROTECTED]> To: "'Roger C Haslock'" <[EMAIL PROTECTED]>; "Gary Hawkins" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 10, 2002 8:27 PM Subject: RE: rand() function > What P

Re: rand() function

2002-01-12 Thread Roger C Haslock
e: $!"); binmode WR; print WR $img->draw(); close WR; however, I have no experience with this package, and suggest you check the documentation Regards - Roger - - Original Message - From: "Gary Hawkins" <[EMAIL PROTECTED]> To: "Roger C Haslock" <

Re: rand() function

2002-01-10 Thread Roger C Haslock
My apologies: a typo has crept in For 'plot rand(),read()' Read 'plot rand(),rand()' That is, generate x,y randomly in the interval (0,1). Regards - Roger - - Original Message - From: "Gary Hawkins" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 09, 2002 11:49 PM

Re: rand() function

2002-01-09 Thread Roger C Haslock
A simple test I discovered years ago for pseudo-random number generators was to take successive pairs, and plot them on a graph. Bad generators would show distinct lines after a while. eg for (0..1) { plot rand(), read() } - Roger - - Original Message - From: "Robert Howard" <

Re: More formatting questions

2002-01-04 Thread Roger C Haslock
Perhaps s/[-|\.]//g; # replace any dash or (escaped) dot with nothing - Original Message - From: "Scott" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 04, 2002 7:48 PM Subject: More formatting questions > First off, thank you to everyone who has helped me dive into p

Re: is there ever a situation when you need a shell script instead of a perl script?

2002-01-04 Thread Roger C Haslock
Trivially, when perl is not installed! - Original Message - From: "Mike Gargiullo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 04, 2002 5:02 PM Subject: RE: is there ever a situation when you need a shell script instead of a perl script? Need? I don't know... But I

Re: Resume after die?

2002-01-04 Thread Roger C Haslock
I think you want the 'come-from' statement (the inverse of a goto-statement). I believe this is under development, and should be available shortly after the end of March. - Roger - - Original Message - From: "Richard J. Barbalace" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday,

Re: C vs. Perl

2002-01-02 Thread Roger C Haslock
Chosing the appropriate algorithm can make orders of magnitude of difference in execution time. There are many problems where the appropriate algorithm for a small data set is inappropriate for a large data set, for example. Perl does, indeed, provide many ways to implement something, and it does

Re: Extracting Titles from a bunch of HTML files

2002-01-02 Thread Roger C Haslock
characters which are NOT equals signs c) ( ... )extract the one or more characters which are NOT equals signs into the variable $1 d) ... which I then use as a filename in open FOO, ">$1" - Roger - - Original Message - From: "Richard S. Crawford" <[EMAIL PROTEC

Re: C vs. Perl

2002-01-02 Thread Roger C Haslock
There are many views on this. 1) Well designed and implemented C will be faster if the application is CPU-intensive. Is this the case? 2) Have you profiled your Perl? Have you experimented with the Inline module? 3) What is the expected lifetime of the code? Is it worth the additional cost of dev

Re: move

2001-12-31 Thread Roger C Haslock
The File::Copy module provides two basic functions, copy and move, which are useful for getting the contents of a file from one place to another. - Original Message - From: "Michael McQuarrie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 31, 2001 3:51 PM Subject: mo

Re: I need your help

2001-12-29 Thread Roger C Haslock
'^' indicates the beginning of a line, '$' indicates the end will s/^$name$/#$name/ do what you want? - Roger - - Original Message - From: "Jose Vicente" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, December 29, 2001 1:26 AM Subject: I need your help > Hi friends. >

Re: Multiple implementations of an interface

2001-12-27 Thread Roger C Haslock
r ObjectFactory in CPAN, to see how it did it, but my search returned nothing. Regards - Roger - - Original Message - From: "Jon Cassorla" <[EMAIL PROTECTED]> To: "Roger C Haslock" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, December

Multiple implementations of an interface

2001-12-23 Thread Roger C Haslock
Hi I am seeking advice of a general nature. I plan to write some software which will interface with another piece of software which may have various alternative replacements - for example, an http server. I intend to write a generic interface module, say 'httpd.pm', and use that to mask the act