Some GDBM_File questions

2009-04-02 Thread Roger Thompson
e is no &GDBM_READ. is it simply a matter of making the priv spec be 0444? The file I'm loading in 1 needs to be shared by four processes. -- Roger Thompson OCLC Online Computer Library Center Inc. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional com

how to load user modules?

2006-04-07 Thread Roger Mayfield
How could I write a script that could anonymously accept user written modules that are listed in a text file? reading from a text file I get, but where would I start on loading the modules dynamically like that? Roger Mayfield -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

RE: Problem changing the content of a file

2004-05-05 Thread Layani, Roger
s/(#define SW_RELEASE_DAY)(.*)/$1\t\t$day/; $_=~ s/(#define SW_RELEASE_YEAR)(.*)/$1\t\t$year/; print RELFILE "$_ \n"; } close (RELFILE); do you what is the problem? Roger Layani -Original Message- From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] Sent: Wedn

Formatting output

2004-02-10 Thread Roger Grosswiler
ook the last line called "Datumsversuch". I should have here 030204...so i could do with some regexp and the variables the deleting of files, which are older than 7 days. Otherwise i must handle this by shell-script or manually *help" thanks, Roger -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Date manipulation

2004-02-10 Thread Roger Grosswiler
d the files with regexp. But: how can i find out the Systems-Date with Perl? Which format has it? Is there a perlman-page? (I was looking, but didn't find...) otherwise i would have to do a bigger workaround in a shell-script (but i would like to learn perl...) Hope for any help, thank you Roge

Re: DBI, Win32::ODBC, encrypted file, udl questions

2002-08-29 Thread Roger Perttu
mrtlc wrote: >I want to pull some data down from a Teradata database to a Win2k/NT server. >I use DBI or Win32::ODBC, a system DSN (teradata1) is created. > >use DBI; >use DBD::ODBC; >my $dbh = DBI->connect("DBI:ODBC:teradata1", "uname", "moo"); >... > >or > >use Win32::ODBC; >$data = new Win32::

Re: exec statement

2002-07-18 Thread Roger Morris
ty, you should put full paths. if you called 'blah.cgi', someone could create blah.cgi, their blah.cgi could get called instead of your blah.cgiby specifying /usr/local/bin/blah.cgi it clearly defines which blah.cgi would get called. Roger -- To unsubscribe, e-mail: [EMA

Re: Please Help

2002-04-30 Thread Roger
Around Tue,Apr 30 2002, at 09:37, Josef E. Galea, wrote: > Thanks for your reply Dave. > Now I am getting 'No such file or directory' when i am sure that the file > exists > > I changed line 1 to: > $file = "D:/test.txt";

RE: How to do a cron job?

2002-04-15 Thread Roger Morris
another alternative. Single file, no dll's. The only thing I dislike is the preferences are stored in the registry. Roger -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: help with perl/Tk

2002-03-07 Thread Roger Morris
At 01:14 PM 3/7/2002 -0500, richard noel fell wrote: >Below is a simple script which I am using as part of my attempt to learn >how to program a gui with perl and Tk. I have copied the program from a >book, "Cross Platform Perl" (not very good, but some isolated good >parts), but get the following

Re: Email Validation

2002-02-19 Thread Roger Morris
At 03:35 PM 2/19/2002 -0800, Randal L. Schwartz wrote: > >>>>> "Roger" == Roger Morris <[EMAIL PROTECTED]> writes: > >Roger> I've been working on email validation for a script. The examples I've >Roger> seen haven't exactly done t

Email Validation

2002-02-19 Thread Roger Morris
TECTED] then go to the second 'if' statement and check for bad characters. It seems to work how I want, have I caught most of the problems? I'm only interested in the email address, not checking to see if this is valid: "roger" <[EMAIL PROTECTED]> sub vali

Re: wondering what might be causing this error

2002-02-11 Thread Roger Morris
At 06:55 PM 2/11/2002 -0500, Ian Christie wrote: >Hi, > >I'm trying to get a script to work. I'm using linux and when I do >something like the following > >../myscript.cgi > >I get > >bash: ./myscript.cgi: bad interpreter: no such file or directory > >I know the #! is correct. Could this be a bas

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?

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'" &l

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" &l

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: Debug some simple code

2002-01-31 Thread Roger Morris
with a a blank value. It never even prompts me to input a number. >What am I doing wrong? = is an assignment operator. Equality is == Roger -- Roger Morris User Services Specialist II [EMAIL PROTECTED] 541-687-3579 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to abut two files?

2002-01-30 Thread Roger Morris
through both files a line at a time printing to a third file. first reading the first file, print, read second file, print etc. for each line. Which Mac OS do you have? X should have perl by default. Roger -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Filenames

2002-01-30 Thread Roger Morris
file is different...Any help would be greatly appreciated. > >Thanks. Just tried this on my linux machine. `date +%s` will return the number of seconds since 00:00:00 1970-01-01 UTC my $date=`date +%s`; open (FILE,">file.$date"); print FILE ("blah"); It w

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 questi

RE: question about CRON

2002-01-24 Thread Roger Morris
e out there ... if the script died for whatever reason, the sleep wouldn't help would it? Also, cron will sometimes allow a 'skip' value. 0-60/5 * * * * /path/to/script or: */5 * * * */path/to/script Skips every 5 minutes. Roger -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

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]> Sen

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 f

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: Sendmail and PERL

2002-01-17 Thread Roger Morris
chmod 700 should do it. Any group or world writable should kill it. I don't think sendmail complains about readable files as much as it does about writable files. What do the logs say? One other way is via a procmail recipe. Something like: :0 * /path/to/perlscript Roger At 08:

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
separator, and look for all characters after TITLE\s* - $/ = ''; my $input = <>; $input =~ /TITLE\s*(.+)/; print $1; - Roger - - Original Message - From: "Martin A. Hansen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 15, 2002 5:

Re: rand() function

2002-01-14 Thread Roger C Haslock
is drifting off-topic for [EMAIL PROTECTED]) You probably need to find out whether the density of points is even across the length of the line. Something like histogramming the number of points in the intervals [0,x],[x,2x],[2x,3x], ...,[nx,1]. - Roger - -- To unsubscribe, e-mail: [EMAIL

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&

Script Idea

2002-01-12 Thread Roger Morris
may boot the computer with it not being part of any network. I'd check for DHCP first, but if it's not available, I don't want to wait for the dhcp timeout to occur. Question, Is it more trouble than it's worth to set something like this up? Does the basic logic of what I wa

Re: rand() function

2002-01-12 Thread Roger C Haslock
There are a number of modules for plotting and drawing images: I am not an expert in this field. I think you will need GD, and I think that has a routine to plot a point - it might be called 'draw'. I would bow to the advice of the gurus on this point! - Roger - - Original Message

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: formmail.pl security

2002-01-11 Thread Roger Morris
someone off-site could create a form that points to the script and send via your mail program (can you say spam). One work around is to hack the code such that the recipient is hard-coded in the script, not the form. Roger -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

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]>

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 H

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: <[E

Re: Newbie - #include virtual in my .SHTML file just displays the contents of the CGI

2002-01-03 Thread Roger Peters
is disabled in IIS5 for security resons if it is left on it CAN be POSIBLE to format your sever from milisous code. or something like that for more infor look at http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q203064 and http://support.microsoft.com/default.aspx?scid=kb;en-us;Q233969

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
development to use C? - Roger - - Original Message - From: "Agustin Rivera" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 02, 2002 5:10 PM Subject: C vs. Perl > Ok, the local Linux guru has proclaimed that C would be faster than Perl. I >

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 A

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
tle effort as can be planned. I do not expect the software to be run on an earlier generation of perl) Thanks - Roger - -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Loop

2001-12-05 Thread roger
exit works to get you out of the script. - Original Message - From: "Ahmed Moustafa" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, December 05, 2001 7:32 AM Subject: Re: Loop > Try using "last" instead of "break". > > - Original Message -

Re: What was your first Perl script

2001-11-09 Thread Roger
pt to add users to an NT4 domain. Just been modifying that one off and on. (need more work on that just found out yesterday) -- Roger --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Off-Topic (200%) - Where are you from?

2001-11-09 Thread Roger Morris
. > >Am I right? > >I'm from Quebec, Canada.. and you? > >Sorry if it's way off topic, I hope the ones that hate OT subject >filtered *off*topic* in their emails! > >Etienne > >-- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands

Re: variable variable-names

2001-10-02 Thread Roger Morris
I didn't use this with perl, it was with php. however, I used Blah Blah Then in the php I had a loop that went through the values of answer At 03:14 PM 10/2/2001 -0700, The Black Man wrote: >Hi all, > >I'm trying to write a script that will pull out values >for form data radio buttons for mul

combine commands

2001-08-29 Thread Roger Morris
on one line? Thanks. Roger -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]