RE: How do I "catch" (or deref?) a passed function reference?

2003-05-29 Thread Bob Showalter
Kevin Pfeiffer wrote: > I've taken a tip from File::Find and am doing this: > > scan_mb(\&wanted, $quiz_mb); > # $quiz_mb contains a pathname to a directory > > (Note this is a small task similar to the newest qotw from MJD) > > I am reading a directory and foreach filename running my function >

RE: RFC s/user Access->M/user web based system

2003-05-29 Thread Bob Showalter
Gary Stainburn wrote: > Hi folks, > > I'm after general ideas and pointers for a project I'm likely to get > lumbered with. > > At the moment we have a membership database written in access on a > windows box. One person is responsible for keeping this up to date > and then distributing the updat

Re: How do I "catch" (or deref?) a passed function reference?

2003-05-29 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Kevin Pfeiffer wrote: [...] > sub scan_mb { > >for ( <$_[1]/*> ) { > next unless (-f $_); > /^.*\/(.*)$/; > wanted($_); >} > } (Please disregard the regex - just a leftover) -- Kevin Pfeiffer International University Bremen -- To unsub

How do I "catch" (or deref?) a passed function reference?

2003-05-29 Thread Kevin Pfeiffer
I've taken a tip from File::Find and am doing this: scan_mb(\&wanted, $quiz_mb); # $quiz_mb contains a pathname to a directory (Note this is a small task similar to the newest qotw from MJD) I am reading a directory and foreach filename running my function &wanted. So, taking a tip from File::F

RFC s/user Access->M/user web based system

2003-05-29 Thread Gary Stainburn
Hi folks, I'm after general ideas and pointers for a project I'm likely to get lumbered with. At the moment we have a membership database written in access on a windows box. One person is responsible for keeping this up to date and then distributing the updated file for others to use - e.g. fo

Re: MySQL and perl using quotes

2003-05-29 Thread Tassilo von Parseval
On Thu, May 29, 2003 at 11:17:40AM +0200 anthony wrote: > i have to update a MySQL tables some names and text > the problem is that the names and words have quotes > maybe in names it has O'connor, and text would be > He said :"I'don't know where to go!!". > > where there is a mixture of single

Re: MySQL and perl using quotes

2003-05-29 Thread Anthony Ward
Hi, thank you , for $name=$dbh->("$name"); It is in my Perl Programming book, I can only guess they are wrong :-) thanx again! Anthony W. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

MySQL and perl using quotes

2003-05-29 Thread anthony
Hi, i have to update a MySQL tables some names and text the problem is that the names and words have quotes maybe in names it has O'connor, and text would be He said :"I'don't know where to go!!". where there is a mixture of single and double quotes in text, i'm really get problem with updating

Re: (de)referencing and Net::Whois::IP

2003-05-29 Thread John W. Krahn
Robert Arnold wrote: > > Hello all, Hello, > I have written a small script which uses Net::Whois::IP; and it > seems to work fine, but in attempt to make the script more > efficient, I've stumbled upon something that I don't understand. > > First of all, the purpose of the script is to take a l

Re: (de)referencing and Net::Whois::IP

2003-05-29 Thread Todd Wade
"Robert Arnold" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello all, > > > while ((my $key, my $value) = each %$response) { >if ($key eq "OrgName") > { > print "$range $value\n"; > #short circuits the while loop...i think

Re: Can anyone see where I messed this up?

2003-05-29 Thread John W. Krahn
Chris Zimmerman wrote: > > Here's the situation: > > I have a program that scans a specially formatted config file and sends files > to customers by e-mail. Within that file is a field that has > [EMAIL PROTECTED]:filename,[EMAIL PROTECTED]:filename ... > Each file is sent to the address "attach

(de)referencing and Net::Whois::IP

2003-05-29 Thread Robert Arnold
Hello all, I have written a small script which uses Net::Whois::IP; and it seems to work fine, but in attempt to make the script more efficient, I've stumbled upon something that I don't understand. First of all, the purpose of the script is to take a list of IPs and check their IP registrations

Trouble with Time::Object Module

2003-05-29 Thread penguinie
Hi, I am fairly new at this and I hope this is the right place to ask this question, if not my apologies and could someone direct me to the right newgroup? I am trying to install the Time::Object module into my perl 5.8.0 (running on Redhat 9.0 with apache and mod_perl) but have no luck using

Re: numbering array elements

2003-05-29 Thread John W. Krahn
Stuart White wrote: > > How do I assign a hash to an array? $ perl -le'%h = qw/a 1 b 2 c 3/; @a = %h; print "@a"' a 1 b 2 c 3 John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: problem opening file inside for-loop

2003-05-29 Thread John W. Krahn
Rob Dixon wrote: > > John W. Krahn wrote: > > > > You should show the OP how to do it in perl. :-) > > Yes, but tough to do when I can only guess what 'date' does > and I have no *nix system with me. Rob, Rob, Rob ... you mean you're still running that evil MS OS? ;-) > Thanks for filling the

Re: Can anyone see where I messed this up?

2003-05-29 Thread Rob Dixon
Chris Zimmerman wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Or maybe let me know if there was a bug in perl 5.6.0? > > Here's the situation: > > I have a program that scans a specially formatted config file and sends files > to customers by e-mail. Within that file is a field that

Re: numbering array elements

2003-05-29 Thread Stuart White
How do I assign a hash to an array? __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: qr// -- huh?

2003-05-29 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > If you need to use a variable in a regular expression it is usually > more efficient to compile it with qr// than to have perl interpolate > and compile it at run-time. s/at run-time/each time/ Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz

Re: Perl dbi - Microsoft Sql Server DRIVER

2003-05-29 Thread Jenda Krynicky
From: "Paul Kraus" <[EMAIL PROTECTED]> > I can't find anything on ppm for dbd microsoft sql server. > > Dbi can communicate with a MsSql server correct? > > If so where and how do I get the driver. Usualy you use DBD::ODBC. If you are not running the code under Windows you may want to try DBD::

Can anyone see where I messed this up?

2003-05-29 Thread Chris Zimmerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Or maybe let me know if there was a bug in perl 5.6.0? Here's the situation: I have a program that scans a specially formatted config file and sends files to customers by e-mail. Within that file is a field that has [EMAIL PROTECTED]:filename,[EMA

Re: problem opening file inside for-loop

2003-05-29 Thread Rob Dixon
John W. Krahn wrote: > Rob Dixon wrote: > > > > Shaunn Johnson wrote: > > > > > > # create a few variables > > > my $addr='[EMAIL PROTECTED]'; > > > #my $outfile=`date +%d%b%Y`; > > > my $outfile=`date | cut -f 1 -d ' '`; > > > my $datetype=`date`; > > > my $file='/usr/local/home/joe/tmp/backup_lis

Re: problem opening file inside for-loop

2003-05-29 Thread John W. Krahn
Rob Dixon wrote: > > Shaunn Johnson wrote: > > > > # create a few variables > > my $addr='[EMAIL PROTECTED]'; > > #my $outfile=`date +%d%b%Y`; > > my $outfile=`date | cut -f 1 -d ' '`; > > my $datetype=`date`; > > my $file='/usr/local/home/joe/tmp/backup_list.txt'; > > my $matchday=`date +%a`; > >

Re: qr// -- huh?

2003-05-29 Thread John W. Krahn
Jeff Westman wrote: > > Okay, this may sound pretty basic, but what is the qr// function used for? It is used to compile a regular expression and store it in a scalar. Note that the value stored is NOT a simple text string. $ perl -le' my $x = qr/.*XX.*/; my $y = q/.*XX.*/; print "$x\t" . ref

Re: RE: How do I check disk space through Perl?

2003-05-29 Thread Rob Dixon
Rob Dixon wrote: > Whoever wrote: > > Am Mit, 2003-05-28 um 17.53 schrieb Jaschar Otto: > > > I've found using Win32::AdminMisc pretty handy, specifically the > > > GetDriveSpace($drive) funtion. > > > > the problem with GetDriveSpace and most similar functions is, > > they just tell you the partit

Re: RE: How do I check disk space through Perl?

2003-05-29 Thread Rob Dixon
Whoever wrote: > Am Mit, 2003-05-28 um 17.53 schrieb Jaschar Otto: > > I've found using Win32::AdminMisc pretty handy, specifically the > > GetDriveSpace($drive) funtion. > > the problem with GetDriveSpace and most similar functions is, > they just tell you the partition size of windows partitions,

Re: matching INSIDE characters (regexp)

2003-05-29 Thread Rob Dixon
Ben Crane wrote: > Bob, > > Excellent, one more question: using my (x,y,z) = /x/ > /y/ /z/ to place the access log data into various > variables, can you use the split command within this > context? eg. > > my (x,y,z,a,b,c) = /x/ /y/ /z/ /split (abc)/ ?? Hi Ben. I'm kinda worried that you're disc

Re: problem opening file inside for-loop

2003-05-29 Thread Rob Dixon
Hi Shaunn. Shaunn Johnson wrote: > Howdy: > > I have a script where I would like to connect to > my database (PostgreSQL) and do a dump > depending on what day it is. I'm having > problems trying to figure out why I either can't > open a file to write to it inside the loop, or, if > I create a fi

RE: problem opening file inside for-loop

2003-05-29 Thread Johnson, Shaunn
--thanks for the reply. --even still, if the file already exists, --nothing is printed inside of the file. --it's still empty and i'm not sure --where it's breaking down. --i mean, i can see that it doesn't --even print the first line (print statement), --but i don't know *why* it's not printin

Re: Server Req's for Client-Side Scripting

2003-05-29 Thread WC -Sx- Jones
On Wednesday, May 28, 2003, at 01:58 PM, Moshe wrote: ok, thanks for the clarification, that makes sense. Not a problem :) I changed the message on my script to alert the user that they will need to download the script locally then run it. Good, that is a step in the right direction. Now a

Re: Server Req's for Client-Side Scripting

2003-05-29 Thread Moshe
ok, thanks for the clarification, that makes sense. I changed the message on my script to alert the user that they will need to download the script locally then run it. "Wc -Sx- Jones" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > PerlScript was designed sort of as a SSI language

Re: problem opening file inside for-loop

2003-05-29 Thread WC -Sx- Jones
On Wednesday, May 28, 2003, at 12:43 PM, Johnson, Shaunn wrote: my $file='/usr/local/home/joe/tmp/backup_list.txt'; You cannot create a variable from something that does not yet exist. Try creating it first: `touch /usr/local/home/joe/tmp/backup_list.txt`; my $file='/usr/local/home/joe/tmp/ba

Re: Server Req's for Client-Side Scripting

2003-05-29 Thread WC -Sx- Jones
PerlScript was designed sort of as a SSI language -- with all those types of problems. Anyone that allows anyone else to execute code from the Web Server on the client is a violation of trust on the part of the Web Server. Can you erase someone's harddrive with JavaScript or VBScript? No, but

Re: RE: How do I check disk space through Perl?

2003-05-29 Thread whoever
Am Mit, 2003-05-28 um 17.53 schrieb Jaschar Otto: > I've found using Win32::AdminMisc pretty handy, specifically the > GetDriveSpace($drive) funtion. the problem with GetDriveSpace and most similar functions is, they just tell you the partition size of windows partitions, not the physical size. If

problem opening file inside for-loop

2003-05-29 Thread Johnson, Shaunn
Howdy: I have a script where I would like to connect to my database (PostgreSQL) and do a dump depending on what day it is. I'm having problems trying to figure out why I either can't open a file to write to it inside the loop, or, if I create a file outside of the for loop, nothing is written i

Re: Server Req's for Client-Side Scripting

2003-05-29 Thread Moshe
So by default, browsers are able to run client-side javascript and vbscript. Are you saying that it is not possible to run PerlScript the same way? Even if I just want to do the same things I would via Javascript, just use PerlScript? I though that perlscript was design for use as a client-side lan

Re: qr// -- huh?

2003-05-29 Thread WC -Sx- Jones
On Wednesday, May 28, 2003, at 12:17 PM, Jeff Westman wrote: qr// See http://webmaster.indiana.edu/perl56/pod/perlop.html HTH/Sx http://InSecurity.org/ _Sx ('>iudicium ferat //\ Have Computer - v_/_Will Hack... \|/ \|/ "@'/ ..

Re: Server Req's for Client-Side Scripting

2003-05-29 Thread WC -Sx- Jones
On Wednesday, May 28, 2003, at 12:17 PM, Moshe wrote: I just don't understand why those hidden variables are not set on clients that do have perl and perlscript installed. They are set on my machine when I run the script from my own web server, but doesn't work when uploaded to geocities or bri

Re: Server Req's for Client-Side Scripting

2003-05-29 Thread Moshe
I'm only trying to run client-side code, just like client-side javascript + DHTML... nothing special. If you look at the source you can see that I'm running two lines of perlscript near the end of the file to set values inside HIDDEN form variables. If the variables are set, it means the client can

qr// -- huh?

2003-05-29 Thread Jeff Westman
Okay, this may sound pretty basic, but what is the qr// function used for? I rarely see it used. I've consulted perldoc perlre, and it still makes no sense. Could someone give a simple, practical example of this in use? Thanks! -Jeff __ Do you Yahoo!? Yahoo!

Re: Server Req's for Client-Side Scripting

2003-05-29 Thread WC -Sx- Jones
On Wednesday, May 28, 2003, at 10:49 AM, Moshe wrote: If any of you folks out there have a ie5+ and perl installed on your machine, navigate to this url http://www.geocities.com/udeleng/regex.htm (Regular Expression Lab) and see if you can select PerlScript from the engine listbox. Oh, I can s

RE: How do I check disk space through Perl?

2003-05-29 Thread Akens, Anthony
I've found using Win32::AdminMisc pretty handy, specifically the GetDriveSpace($drive) funtion. Look here: http://www.roth.net/perl/adminmisc/ -Tony -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 27, 2003 12:05 PM To: [EMAIL PROTECTED] Subject: Ho

RE: Thanx Dan

2003-05-29 Thread Dan Muey
No problem, hope it works out. -Original Message- From: Ben Crane [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 9:48 AM To: Dan Muey Cc: [EMAIL PROTECTED] Subject: RE: Thanx Dan Dan, No...Thank you for trying!! I really appreciate it...you've done more than a lot of people wo

Re: Server Req's for Client-Side Scripting

2003-05-29 Thread Moshe
If any of you folks out there have a ie5+ and perl installed on your machine, navigate to this url http://www.geocities.com/udeleng/regex.htm (Regular Expression Lab) and see if you can select PerlScript from the engine listbox. I couldn't. I uploaded this script to brinkster (win2k) and the same t

RE: Thanx Dan

2003-05-29 Thread Ben Crane
Dan, No...Thank you for trying!! I really appreciate it...you've done more than a lot of people would! I'm sure it's a windows thing and more importantly, I'm sure it's a admin setup from this end...the IT people here are obsessional about control, which is why OI have to duck and dive to get thin

RE: cgi LWP::Simple script and Apache

2003-05-29 Thread Dan Muey
I say give it a try. I try to avoid MS stuff whenever possible,( I know I know this message is made with Outlook ) so I couldn't really tell you. Any MCSE out there listening or are they all working at McDonalds? ( That should bring a couple out of the wood work to help you ;p ) >If it's

RE: cgi LWP::Simple script and Apache

2003-05-29 Thread Dan Muey
Noe sure about that one. It's weird a browser has internet access but perl doesn't. I'm all out of ideas, any winders people out there? Here's a better more permanent fix : Kill Windows and install any flavor of *nix. Actually making it dual boot and trying it on *nix would be a good idea. I be

RE: RE: matching INSIDE characters (regexp): THANK YOU!

2003-05-29 Thread Ben Crane
Hi, Thanx you Jaschar and Bob for your help, I've got a solid idea on what I'm doing wrong...back to the drawing board. Regards Ben __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- To unsubscribe, e-

RE: cgi LWP::Simple script and Apache

2003-05-29 Thread Ben Crane
Dan, If it's not having any of this running locally, can I map a virtual server that is in fact the organisation's server? specify an alternate IP address? Please tell me if I'm way off beat Ben __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync

RE: cgi LWP::Simple script and Apache

2003-05-29 Thread Ben Crane
Dan, Nope, doesn't work, either of them. I get these errors from the error.log file Premature end of script headers: c:/program files/apache group/apache/cgi-bin/test.cgi Use of uninitialized value in print at c:/program files/apache group/apache/cgi-bin/test.cgi line 5. I'm running my perl fro

RE: Calculate the values of 3 arrays to one

2003-05-29 Thread Dan Muey
Or even a few charactres shorter and a bit easier to read : for(0..2) { $res[$_]=$array1[$_] + $array2[$_] + $array3[$_]; } >for($i=0;$i<3;$i++){ > $res[$i]=$array1[$i] + $array2[$i] + $array3[$i]; >} :) HTH DMuey -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Net::Whois::IP

2003-05-29 Thread Benjamin Jeeves
Hi all has any one done any thing with Net::Whois::IP if so how do print the Whois infomration that is return. Thank you Benjamin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Perl dbi - Microsoft Sql Server DRIVER

2003-05-29 Thread Paul Kraus
I can't find anything on ppm for dbd microsoft sql server. Dbi can communicate with a MsSql server correct? If so where and how do I get the driver. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: cgi LWP::Simple script and Apache

2003-05-29 Thread Dan Muey
So you can open www.google.com in a browser but can't get it via get()? Copy and Paste this code and run just it (adjusting your path to perl of course): #!/usr/bin/perl -w use strict; use LWP::Simple; print "Content-type: text/html\n\n"; print get("http://216.239.33.100/";);

RE: RE: matching INSIDE characters (regexp)

2003-05-29 Thread Ben Crane
Jaschar Otto, Okay, thanx a million, Bob's idea of splitting the string is a good one and now I have your code. thank you! Ben __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- To unsubscribe, e-mai

RE: matching INSIDE characters (regexp)

2003-05-29 Thread Ben Crane
Bob, Excellent, one more question: using my (x,y,z) = /x/ /y/ /z/ to place the access log data into various variables, can you use the split command within this context? eg. my (x,y,z,a,b,c) = /x/ /y/ /z/ /split (abc)/ ?? Thanx Ben __ Do you Yahoo!? Yahoo! Calend

RE: cgi LWP::Simple script and Apache

2003-05-29 Thread Ben Crane
--- Dan Muey <[EMAIL PROTECTED]> wrote: > > Please reply to the list and not just to me so > everyone can help/learn. Done. > First things first. Before you get into parseing the > result of get() > Make sure it's getting the right thing. > > 1) Can you open http://www.google.com/ in a browser