Re: generating GIFs

2003-12-20 Thread agftech lists
You might want to look at Image::Magick at www.imagemagick.com HTH On Sat, 2003-12-20 at 14:23, Andrew Gaffney wrote: > I want to write a Perl program that will auto generate GIF images. The images that I > want > to generate will be about 30x80. It will be a black rectangle starting in the > b

Re: deallocating?

2003-12-20 Thread drieux
On Dec 20, 2003, at 1:14 PM, NYIMI Jose (BMB) wrote: http://www.perl.com/pub/a/2002/08/07/proxyobject.html?page=3 José. [..] worth while Read - thanks! But back to christopher's query On Dec 20, 2003, at 11:46 AM, christopher j bottaro wrote: just for practice, i made a class BinaryTree. its

Re: diff between packages and modules

2003-12-20 Thread drieux
On Dec 20, 2003, at 12:31 PM, R. Joseph Newton wrote: [..] It might be worth a trip to the archives to review this thread. Joseph for those following along at home: being the thread I think Joseph is referring to... whi

Re: Win32 Registry

2003-12-20 Thread R. Joseph Newton
Tim Johnson wrote: > Win32::TieRegistry will do what you want. > > use Win32::TieRegistry (delimiter => '/'); > my $run = > $Registry->{'HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run'}; > $run->{'MyApp'} = "My Application"; > > etc., etc. That looks like a good example of the

RE: deallocating?

2003-12-20 Thread NYIMI Jose (BMB)
Did you read this ? http://www.perl.com/lpt/a/2002/08/07/proxyobject.html José. -Original Message- From: christopher j bottaro [mailto:[EMAIL PROTECTED] Sent: Saturday, December 20, 2003 8:46 PM To: [EMAIL PROTECTED] Subject: deallocating? just for practice, i made a class BinaryTree.

RE: deallocating?

2003-12-20 Thread NYIMI Jose (BMB)
http://www.perl.com/pub/a/2002/08/07/proxyobject.html?page=3 José. -Original Message- From: christopher j bottaro [mailto:[EMAIL PROTECTED] Sent: Saturday, December 20, 2003 8:46 PM To: [EMAIL PROTECTED] Subject: deallocating? just for practice, i made a class BinaryTree. its just a b

Re: generating GIFs

2003-12-20 Thread Daniel Staal
--As off Saturday, December 20, 2003 2:23 PM -0600, Andrew Gaffney is alleged to have said: I want to write a Perl program that will auto generate GIF images. The images that I want to generate will be about 30x80. It will be a black rectangle starting in the bottom-right with a few pixels border

generating GIFs

2003-12-20 Thread Andrew Gaffney
I want to write a Perl program that will auto generate GIF images. The images that I want to generate will be about 30x80. It will be a black rectangle starting in the bottom-right with a few pixels border on the top and left. There will be a light blue rectangle starting in the top-left with a

Re: diff between packages and modules

2003-12-20 Thread R. Joseph Newton
drieux wrote: > On Dec 19, 2003, at 1:16 PM, christopher j bottaro wrote: > > > i'm reading "Programming Perl" and i'm on the chapter about packages. it > says > > that packages and modules are very similar and that novices can think of > > packages, modules, and classes as the same thing, but i

Re: diff between packages and modules

2003-12-20 Thread R. Joseph Newton
christopher j bottaro wrote: > ahh thank you. > > so saying > > package CJB; > > is like saying > > namespace CJB { I was afraid of this when you said that you knew C++, therefore you know what classes are. It is good to see the parallels between languages, but it can also cause problems. Per

deallocating?

2003-12-20 Thread christopher j bottaro
just for practice, i made a class BinaryTree. its just a blessed reference to a hash that contains two things: size and root. root gets assigned to a BinaryTree::Node which is just a bless reference containing: key, value, left, right. perl deallocates according to reference counts. so if i

Re: Calling another perl file

2003-12-20 Thread drieux
On Dec 20, 2003, at 8:06 AM, Peter Scott wrote: [..] You are missing a '|' in there. thanks for the catch... [..] No reason not to make that much simpler using backticks: sub run_cmd { my $cmd = shift; my $args = shift || ''; my @output = `$cmd $args 2>&1`; $? < 0 and return "ERROR: proble

RE: Simple string API question

2003-12-20 Thread Charles K. Clarkson
glidden, matthew <[EMAIL PROTECTED]> wrote: : : Just started working on scripts and wanted to compare : strings yesterday, but using strEQ (or strcmp) gets me : an undefined method error. What library should I "use" : in my script to get those API? Couldn't find the answer : in any on-line tutoria

Re: Ending a compound statement

2003-12-20 Thread drieux
On Dec 19, 2003, at 8:46 PM, Kenton Brede wrote: On Thu, Dec 18, 2003 at 12:37:33PM -0800, drieux wrote: [..] I've worked with the examples you have shown and I have to admit I'm just not advanced enough to follow your approach. I'll ask a few questions in hopes of getting a little closer to under

Simple string API question

2003-12-20 Thread glidden, matthew
Just started working on scripts and wanted to compare strings yesterday, but using strEQ (or strcmp) gets me an undefined method error. What library should I "use" in my script to get those API? Couldn't find the answer in any on-line tutorials. Thanks, Matthew -- To unsubscribe, e-mail: [EMAIL

Re: diff between packages and modules

2003-12-20 Thread drieux
On Dec 19, 2003, at 8:30 PM, christopher j bottaro wrote: thanks for the reply. i think i'm understanding it a little better now. but i haven't really got a firm grasp on OO perl, so that example is a bit over my head still. Not a problem - save it for some time later. As I said, pick up

Re: where to look for modules?

2003-12-20 Thread drieux
On Dec 20, 2003, at 2:33 AM, christopher j bottaro wrote: on my system, perl looks for modules in /usr/lib/perl5/5.8.0/. how can i specify an additional path to look for modules in? say for instance, /home/cjb/perlmodules/ in addition to the aforementioned path. first off, if I may recommend i

RE: Win32 Registry

2003-12-20 Thread Jeff Westman
Tim Johnson <[EMAIL PROTECTED]> wrote: > Win32::TieRegistry will do what you want. > > use Win32::TieRegistry (delimiter => '/'); > my $run = > $Registry->{'HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run'}; > $run->{'MyApp'} = "My Application"; > > etc., etc. Suppose I had s

Re: 'unpipe' STDIN

2003-12-20 Thread Beau E. Cox
On Saturday 20 December 2003 06:02 am, Steve Grazzini wrote: > On Dec 20, 2003, at 10:44 AM, Beau E. Cox wrote: > > but I can't seem to figure out how to reopen STDIN to the > > keyboard device. Any hints? > > You could use: > > open STDIN, '/dev/tty' or die "open: /dev/tty: $!"; > > Or you c

Re: When to USE shift or @_

2003-12-20 Thread Randal L. Schwartz
> "Daniel" == Daniel Staal <[EMAIL PROTECTED]> writes: Daniel> The difference with using shift or assigning it directly is shift Daniel> removes the value from the array, assigning it directly does not. This Daniel> may not make much difference, but occasionally it does. I generally prefer sh

Re: Calling another perl file

2003-12-20 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Drieux) writes: > >On Dec 18, 2003, at 10:12 PM, Tushar Gokhale wrote: > >> How do I call another perl script from my current perl script? I'm >> working >> on one perl testing harness, currently my "bin/run.pl" has a control >> and >> now I wan

Re: 'unpipe' STDIN

2003-12-20 Thread Steve Grazzini
On Dec 20, 2003, at 10:44 AM, Beau E. Cox wrote: but I can't seem to figure out how to reopen STDIN to the keyboard device. Any hints? You could use: open STDIN, '/dev/tty' or die "open: /dev/tty: $!"; Or you could just open another filehandle (e.g. TTY) and read the user input from that, ra

Re: debugger

2003-12-20 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Eric Walker) writes: >Hello all, >When using the perl debugger, is there a way to load in the breakpoints >and watch variables that I want from a file. I am using it now and as I >am debugging I am finding problems but when I start the program ov

'unpipe' STDIN

2003-12-20 Thread Beau E. Cox
Hi - I have a perl 'filter' script that relies on piped input from STDIN, i.e.: find /etc/ | ./myfilter.pl etc... I have a need to interact with the user later in this script (or in a forked script), and , hence need STDIN to again accept input from the keyboard device after I process all of t

Re: Preventing Accidentally Fork Bombing My Box

2003-12-20 Thread George Schlossnagle
On Dec 20, 2003, at 12:58 AM, R. Joseph Newton wrote: Dan Anderson wrote: I'm creating an app that uses forks in a number of places to do things quicker. Unfortunately, I have a bad habit of accidentally fork bombing my box. This is a pretty good sign that you are over-using the fork command. E

Re: where to look for modules?

2003-12-20 Thread Owen
On Sat, 20 Dec 2003 04:33:24 -0600 christopher j bottaro <[EMAIL PROTECTED]> wrote: > on my system, perl looks for modules in /usr/lib/perl5/5.8.0/. how can i > specify an additional path to look for modules in? say for > instance, /home/cjb/perlmodules/ in addition to the aforementioned path.

Re: where to look for modules?

2003-12-20 Thread Randy W. Sims
On 12/20/2003 5:33 AM, christopher j bottaro wrote: on my system, perl looks for modules in /usr/lib/perl5/5.8.0/. how can i specify an additional path to look for modules in? say for instance, /home/cjb/perlmodules/ in addition to the aforementioned path. set the PERL5LIB environment variable

where to look for modules?

2003-12-20 Thread christopher j bottaro
on my system, perl looks for modules in /usr/lib/perl5/5.8.0/. how can i specify an additional path to look for modules in? say for instance, /home/cjb/perlmodules/ in addition to the aforementioned path. thank you, -- christopher -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

Re: How to write a page break character.

2003-12-20 Thread John W. Krahn
Chetak Sasalu wrote: > > Hi, Hello, > I want to search for the word "status" in a group of files in a > directory and replace it with "status\n^L" where ^L is a page break > chatacter, In vi I can type it in using cntrl+l. > > I want to do this by > > perl -p -i.old -e 's/^STATUS$/STATUS\n(pag

Re: How to write a page break character.

2003-12-20 Thread Robert Brown
Randy W. Sims writes: > On 12/20/2003 2:37 AM, [EMAIL PROTECTED] wrote: > > > Hi, > > > > I want to search for the word "status" in a group of files in a > > directory and replace it with "status\n^L" where ^L is a page break > > chatacter, In vi I can type it in using cntrl+l. > > > >

RE: Win32 Registry

2003-12-20 Thread Tim Johnson
Win32::TieRegistry will do what you want. use Win32::TieRegistry (delimiter => '/'); my $run = $Registry->{'HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run'}; $run->{'MyApp'} = "My Application"; etc., etc. -Original Message- From: Jeff Westman [mailto

Re: How to write a page break character.

2003-12-20 Thread Randy W. Sims
On 12/20/2003 2:37 AM, [EMAIL PROTECTED] wrote: Hi, I want to search for the word "status" in a group of files in a directory and replace it with "status\n^L" where ^L is a page break chatacter, In vi I can type it in using cntrl+l. I want to do this by perl -p -i.old -e 's/^STATUS$/STATUS\n(pag

How to write a page break character.

2003-12-20 Thread chetak.sasalu
Hi, I want to search for the word "status" in a group of files in a directory and replace it with "status\n^L" where ^L is a page break chatacter, In vi I can type it in using cntrl+l. I want to do this by perl -p -i.old -e 's/^STATUS$/STATUS\n(page break character)/' * How can I "write" the p