Re: Dynamically loading perl code

2007-07-12 Thread Gregory Machin
On 7/12/07, Chas Owens <[EMAIL PROTECTED]> wrote: On 7/12/07, Gregory Machin <[EMAIL PROTECTED]> wrote: > Hi > I have a rusty memory of perl have the ability, where by you can load > perl code into an variable / array then execute it on demand, anyone > got an example of how to do this .. > > Man

Re: Search and Replace

2007-07-12 Thread Chas Owens
On 7/12/07, Joseph L. Casale <[EMAIL PROTECTED]> wrote: Hi All, How can I make this expression: $line =~ s/(\S+)\s+(\S+)\s+(\S+)/X$1 Y$2 Z$3/ Add some numerical value to the Z$3 part, so if $3 was 3.14, I want it to be Z4.14 for example by adding 1 to it. Use the e option to turn the replace

[OT] Re: Email Notifications

2007-07-12 Thread tannhauser
On Do, 12.07, 18:09, Mike Blezien wrote: > Hello, > I was just wondering if there was another way to track a mailing to see if > it was read, automatically or other means of tracking email that has > been received/read without the recipient intervention? Sounds like spamer's paradise. --

Re: [OT] Email Notifications

2007-07-12 Thread Mr. Shawn H. Corey
Mike Blezien wrote: Hello, we have been using the "Disposition-Notification-To: in the mail header("Request Read Receipt") to be notified when an email has been received, but this does require the recipient to respond Yes or No to send response. Is there a way to force your readers to comp

Re: writing directory name into a file inside the directory

2007-07-12 Thread John W. Krahn
[EMAIL PROTECTED] wrote: On Jul 12, 12:59 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: for my $path ( <*P4/[0-9][0-9][0-9]> ) { open my $fh, '>', "$path/PREVUE2.CFG" or die "Cannot open '$path/PREVUE2.CFG' $!"; print $fh $path; } Hey John, Thanks for the reply. I'm g

Re: reference to array of hashes in OOP

2007-07-12 Thread Inventor
On Jul 11, 9:04 pm, [EMAIL PROTECTED] (Paul Lalli) wrote: > If you have access to the server logs, check them. If not, add this > line to the top of your program, right under use strict and use > warnings: > > use CGI::Carp qw/fatalsToBrowser/; > > Paul Lalli Thanks Paul, it's nice to have error

Re: writing directory name into a file inside the directory

2007-07-12 Thread [EMAIL PROTECTED]
On Jul 12, 12:59 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: > [EMAIL PROTECTED] wrote: > > Here's a snippet of my tree: > > > |-- PresidentialSeatingP4 > > | |-- 702 > > | | |-- Photos > > | | |-- Templates > > | | `-- models > > | | |-- Fabrics > > | | `-- Frames >

[OT] Email Notifications

2007-07-12 Thread Mike Blezien
Hello, we have been using the "Disposition-Notification-To: in the mail header("Request Read Receipt") to be notified when an email has been received, but this does require the recipient to respond Yes or No to send response. I was just wondering if there was another way to track a mailing t

RE: Search and Replace

2007-07-12 Thread Joseph L. Casale
Ok Rob, I'll have a look. Thanks! jlc -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: Thursday, July 12, 2007 1:22 PM To: beginners@perl.org Cc: Joseph L. Casale Subject: Re: Search and Replace Joseph L. Casale wrote: > > How can I make this expression: > $line =~ s/(\

Re: Search and Replace

2007-07-12 Thread Rob Dixon
Joseph L. Casale wrote: How can I make this expression: $line =~ s/(\S+)\s+(\S+)\s+(\S+)/X$1 Y$2 Z$3/ Add some numerical value to the Z$3 part, so if $3 was 3.14, I want it to be Z4.14 for example by adding 1 to it. May I reply amending my original solution to your problem, which seems to me

RE: Search and Replace

2007-07-12 Thread Joseph L. Casale
Hi All, How can I make this expression: $line =~ s/(\S+)\s+(\S+)\s+(\S+)/X$1 Y$2 Z$3/ Add some numerical value to the Z$3 part, so if $3 was 3.14, I want it to be Z4.14 for example by adding 1 to it. Thanks! -Original Message- From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED] Sent: W

Re: installing DBD::mysql

2007-07-12 Thread usenet
On Jul 11, 4:31 am, [EMAIL PROTECTED] (Octavian Rasnita) wrote: > I am trying to install DBD::mysql and I see that it tries to connect to the > server using the socket /var/lib/mysql/mysql.sock > > This is because another version of MySQL was installed on the server, and I > have installed another

Re: Still stuck with my cards

2007-07-12 Thread Martin Barth
> Because he wants the final string to be "Jokerack", why else? > (Possibly a rack for storing jokes ;) *gg* -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: writing directory name into a file inside the directory

2007-07-12 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Here's a snippet of my tree: |-- PresidentialSeatingP4 | |-- 702 | | |-- Photos | | |-- Templates | | `-- models | | |-- Fabrics | | `-- Frames | `-- Database |-- PrimoInternationalP4 | |-- 703 | | |-- Photos | | |-- Templates |

Re: Still stuck with my cards

2007-07-12 Thread Martin Barth
I still don't understand why you have both lines in it!? >s/J/Jack/; >s/J/Joker/; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Still stuck with my cards

2007-07-12 Thread Mr. Shawn H. Corey
Martin Barth wrote: I still don't understand why you have both lines in it!? s/J/Jack/; s/J/Joker/; Because he wants the final string to be "Jokerack", why else? (Possibly a rack for storing jokes ;) -- Just my 0.0002 million dollars worth, Shawn "For the things we h

Re: installing DBD::mysql

2007-07-12 Thread usenet
On Jul 11, 4:31 am, [EMAIL PROTECTED] (Octavian Rasnita) wrote: > I am trying to install DBD::mysql and I see that it tries to connect to the > server using the socket /var/lib/mysql/mysql.sock > > This is because another version of MySQL was installed on the server, and I > have installed another

Re: writing directory name into a file inside the directory

2007-07-12 Thread Mr. Shawn H. Corey
[EMAIL PROTECTED] wrote: The mission: I need to write the name of the number folder to a file. The filename must be PREVUE2.CFG. The file must be located inside the folder by which it got it's name. Use File::Find to find the directories, then write their names in the appropriate file. p

Re: Dynamically loading perl code

2007-07-12 Thread Chas Owens
On 7/12/07, Gregory Machin <[EMAIL PROTECTED]> wrote: Hi I have a rusty memory of perl have the ability, where by you can load perl code into an variable / array then execute it on demand, anyone got an example of how to do this .. Many Thanks The string based version eval function can do this

Re: writing directory name into a file inside the directory

2007-07-12 Thread Chas Owens
On 7/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: snip I need to write the name of the number folder to a file. The filename must be PREVUE2.CFG. The file must be located inside the folder by which it got it's name. snip I would suggest looking at the following resources. Feel free to

writing directory name into a file inside the directory

2007-07-12 Thread [EMAIL PROTECTED]
Here's a snippet of my tree: |-- PresidentialSeatingP4 | |-- 702 | | |-- Photos | | |-- Templates | | `-- models | | |-- Fabrics | | `-- Frames | `-- Database |-- PrimoInternationalP4 | |-- 703 | | |-- Photos | | |-- Templates | | `-- models | |

Re: Still stuck with my cards

2007-07-12 Thread Amichai Teumim
Thanks Christopher! On 7/12/07, Boyle, Christopher <[EMAIL PROTECTED]> wrote: You need to move a bracket print "@startingdeck[0 .. 4]\n"; }<--- This should be above the print statement } print "@startingdeck[0 .. 4]\n"; You might also want to change the 99 to something e

RE: Still stuck with my cards

2007-07-12 Thread Boyle, Christopher
You need to move a bracket print "@startingdeck[0 .. 4]\n"; }<--- This should be above the print statement } print "@startingdeck[0 .. 4]\n"; You might also want to change the 99 to something else to get a more RANDom seeming shuffle but you said this was a snippet so that

Still stuck with my cards

2007-07-12 Thread Amichai Teumim
There we go...my print statement was stuck in my loop. Thanks! push @startingdeck, @shuffle; } print "@startingdeck[0 .. 4]\n";

Re: Still stuck with my cards

2007-07-12 Thread Mr. Shawn H. Corey
Amichai Teumim wrote: I'm still stuck with this. It shuffles the cards, then replaces the letter representing the card (such as H = heart) with the word. Then it's meant to print the top five cards (meanign the five cards that come first after the shuffling). It does that, 100 times. 1. Remove

Re: Still stuck with my cards

2007-07-12 Thread Paul Lalli
On Jul 12, 10:33 am, [EMAIL PROTECTED] (Amichai Teumim) wrote: > it's meant to > print the top five cards (meanign the five cards that come first after the > shuffling). Somethign like: > > 9 Heart 10 Heart J Heart Queen Heart King Heart 6 Diamonds > > This script prints out a whole bunch of stuff.

Still stuck with my cards

2007-07-12 Thread Amichai Teumim
I'm still stuck with this. It shuffles the cards, then replaces the letter representing the card (such as H = heart) with the word. Then it's meant to print the top five cards (meanign the five cards that come first after the shuffling). Somethign like: 9 Heart 10 Heart J Heart Queen Heart King H

Re: Exception handling in perl

2007-07-12 Thread Ovid
- Original Message From: Pushkar Pande <[EMAIL PROTECTED]> > How do we handle exceptions in perl? If you want *proper* exception handling (exception objects, try/catch, stack traces, etc), the don't use: die $message; return 0; eval {}; # except with exception objects $SIG{__DI

Re: installing DBD::mysql

2007-07-12 Thread Stephen Kratzer
On Wednesday 11 July 2007 07:31:30 Octavian Rasnita wrote: > Hi, > > I am trying to install DBD::mysql and I see that it tries to connect to the > server using the socket > /var/lib/mysql/mysql.sock > > This is because another version of MySQL was installed on the server, and I > have installed ano

Re: How to get a list of child processes (Unix systems only)

2007-07-12 Thread yaron
Thanks, Seems so logical. Yaron Kahanovitch - Original Message - From: "Mr. Shawn H. Corey" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: "Paul Lalli" <[EMAIL PROTECTED]>, beginners@perl.org Sent: Thursday, July 12, 2007 12:59:02 PM (GMT+0200) Auto-Detected Subject: Re: How to get

Re: Exception handling in perl

2007-07-12 Thread Mr. Shawn H. Corey
Pushkar Pande wrote: How do we handle exceptions in perl? perldoc -f eval Example: eval { some code }; if( $@ ){ # an exception occurred } -- Just my 0.0002 million dollars worth, Shawn "For the things we have to learn before we can do them, we learn by doing them." Aristotle

Re: Exception handling in perl

2007-07-12 Thread Martin Barth
On Thu, 12 Jul 2007 16:06:27 +0530 "Pushkar Pande" <[EMAIL PROTECTED]> wrote: > How do we handle exceptions in perl? there is a Error.pm in CPAN, which allows you to write code like that try { something(); } catch Error with { code(); }otherwise{ foobar(); }; -- To

Exception handling in perl

2007-07-12 Thread Pushkar Pande
How do we handle exceptions in perl?

Re: Dynamically loading perl code

2007-07-12 Thread Gary Stainburn
On Thursday 12 July 2007 11:05, Gregory Machin wrote: > Hi > I have a rusty memory of perl have the ability, where by you can load > perl code into an variable / array then execute it on demand, anyone > got an example of how to do this .. > > Many Thanks > Hi Gregory Are you thinking about the e

Dynamically loading perl code

2007-07-12 Thread Gregory Machin
Hi I have a rusty memory of perl have the ability, where by you can load perl code into an variable / array then execute it on demand, anyone got an example of how to do this .. Many Thanks -- Gregory Machin [EMAIL PROTECTED] www.linuxpro.co.za -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: How to get a list of child processes (Unix systems only)

2007-07-12 Thread Mr. Shawn H. Corey
[EMAIL PROTECTED] wrote: Hi, Thanks for the reply, Indeed our code solves the problem but not efficiently. Your have to iterate over all running processes in order to filter the child processes. I wondered if there is a possibility to directly get the child processes. No. In UNIX, every p

Re: How to get a list of child processes (Unix systems only)

2007-07-12 Thread yaron
Hi, Thanks for the reply, Indeed our code solves the problem but not efficiently. Your have to iterate over all running processes in order to filter the child processes. I wondered if there is a possibility to directly get the child processes. anyway thanks, Yaron Kahanovitch - Origin