Re: Comparing file contents (code included)

2005-09-13 Thread Robert
John Doe wrote: Robert am Mittwoch, 14. September 2005 00.38: Chris Charley wrote: - Original Message - From: "Robert" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Tuesday, September 13, 2005 1:39 PM Subject: Re: Comparing file contents (code included) Is there a way (

Re: how do i test for reference equality?

2005-09-13 Thread Adriano Ferreira
> Are there any ways to test whether the two references point to the same > thing? >From "perldoc perlref": Using a reference as a number produces an integer representing its storage location in memory. The only useful thing to be done with this is to compare two references numericall

Re: Can I alter the system wide @INC array?

2005-09-13 Thread John Doe
Andre am Dienstag, 13. September 2005 22.08: > Hello, > > I have trouble to use the "perldoc" program. > I want to read the documentation for "WidgetDemo" which is installed > in /usr/lib/perl5/vendor_perl/5.8.5/i686-linux/Tk/WidgetDemo.pod. This means that the packages full name is Tk::WidgetDemo

Re: Comparing file contents (code included)

2005-09-13 Thread John Doe
Robert am Mittwoch, 14. September 2005 00.38: > Chris Charley wrote: > > - Original Message - From: "Robert" <[EMAIL PROTECTED]> > > Newsgroups: perl.beginners > > To: > > Sent: Tuesday, September 13, 2005 1:39 PM > > Subject: Re: Comparing file contents (code included) > > > >> Is there a

Can I alter the system wide @INC array?

2005-09-13 Thread Andre
Hello, I have trouble to use the "perldoc" program. I want to read the documentation for "WidgetDemo" which is installed in /usr/lib/perl5/vendor_perl/5.8.5/i686-linux/Tk/WidgetDemo.pod. When I give the command "perldoc WidgetDemo" then I get the error 'No documentation found for "WidgetDemo".'

how do i test for reference equality?

2005-09-13 Thread Denis
I am working with the perl Template-Toolkit with DateTime objects. When I try to use the DateTime object: [% dt.year %] in the TT template the script dies: undef error - Cannot compare a datetime to a regular scalar at /usr/local/lib/perl5/site_perl/5.8.7/i686-linux/DateTime.pm line 1397 I have

Re: Comparing file contents (code included)

2005-09-13 Thread Robert
Chris Charley wrote: - Original Message - From: "Robert" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Tuesday, September 13, 2005 1:39 PM Subject: Re: Comparing file contents (code included) Is there a way (since I have the file open) that I can prepend a value (I need a

Re: Comparing file contents (code included)

2005-09-13 Thread Chris Charley
- Original Message - From: "Robert" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Tuesday, September 13, 2005 1:39 PM Subject: Re: Comparing file contents (code included) Is there a way (since I have the file open) that I can prepend a value (I need a number to be inserte

Re: Problem with backtick command to compile a perl program

2005-09-13 Thread Tony Frasketi
Jeff 'japhy' Pinyan wrote: On Sep 13, Tony Frasketi said: my($filename) = "/home/blahblah/cgi-bin/ifgen/ifgen.cgi my($command) = "/usr/bin/perl -c $filename"; print "command[$command]"; my(@results) = `$command`; 'perl -c' sends its output to STDERR, not STDOUT. To catch

Re: Algorithm Help Needed

2005-09-13 Thread John W. Krahn
Jay Savage wrote: > > This sort of thing is unfortunately application specific, and depends > a lot on what your goal is. If you do a web search for wieghted round > robin or load balancing, you'll get a lot of food for thought. If you > really need to do careful scheduling--say for load balancing

Re: Problem with backtick command to compile a perl program

2005-09-13 Thread Jeff 'japhy' Pinyan
On Sep 13, Tony Frasketi said: my($filename) = "/home/blahblah/cgi-bin/ifgen/ifgen.cgi my($command) = "/usr/bin/perl -c $filename"; print "command[$command]"; my(@results) = `$command`; 'perl -c' sends its output to STDERR, not STDOUT. To catch that, I would suggest using the

RE: Use of uninitialized value

2005-09-13 Thread Jeff 'japhy' Pinyan
On Sep 13, [EMAIL PROTECTED] said: do you want me to seed the entire program. it is over 700 lines? it on lines 246 for eaxmple. And anywhere I assign a variable to a q->param construct such as $which_import and $which_radio_button. What I meant was, given the code you've SHOWN us, tell u

RE: Algorithm Help Needed

2005-09-13 Thread Bob Showalter
Jeff 'japhy' Pinyan wrote: > The extreme cases are the easy ones, though. What I'd like to see are > cases like: > >foo => 1 >bar => 2 >qux => 3 >baz => 4 >zip => 5 > > Once I know what the algorithm's outcome should be for something like > that, I think I can develop it. He

Problem with backtick command to compile a perl program

2005-09-13 Thread Tony Frasketi
I can't seem to get any results back from compiling a perl progam from another perl program via the backtick method. My understanding that the output of the backtick command returns the results of the command executed into an array. And in the past I've used the backtick method successfully for

Re: Comparing file contents (code included)

2005-09-13 Thread Robert
Is there a way (since I have the file open) that I can prepend a value (I need a number to be inserted) onto the line? Robert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Use of uninitialized value

2005-09-13 Thread DBSMITH
"Charles K. Clarkson" <[EMAIL PROTECTED]

Re: Algorithm Help Needed

2005-09-13 Thread Jay Savage
On 9/13/05, Eric Walker <[EMAIL PROTECTED]> wrote: > On Tuesday 13 September 2005 09:55 am, Jeff 'japhy' Pinyan wrote: > > On Sep 13, Bob Showalter said: > > > I need help with an algorithm. I'm writing a program that sends a > > > repeated pattern of requests to a service. Each request has a "weig

Re: Comparing file contents (code included)

2005-09-13 Thread Wiggins d'Anconia
John W. Krahn wrote: > Wiggins d'Anconia wrote: > >>Robert wrote: >> >>>When Perl is doing this comparison is it doing it line by line (like an >>>actual DIFF) or is it putting the lines into an "array" and the checking >>>that array against the second file? >> >>Well yes and no, to both. It is st

RE: Use of uninitialized value

2005-09-13 Thread Charles K. Clarkson
[EMAIL PROTECTED] wrote: : do you want me to seed the entire program. it is over 700 : lines? it on lines 246 for eaxmple. And anywhere I assign a : variable to a q->param construct such as $which_import and : $which_radio_button. You could send us a working ex

Re: Comparing file contents (code included)

2005-09-13 Thread John W. Krahn
Wiggins d'Anconia wrote: > Robert wrote: >>When Perl is doing this comparison is it doing it line by line (like an >>actual DIFF) or is it putting the lines into an "array" and the checking >>that array against the second file? > > Well yes and no, to both. It is storing the lines temporarily, but

Re: Comparing file contents (code included)

2005-09-13 Thread Robert
"Wiggins d'Anconia" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Robert wrote: > > When Perl is doing this comparison is it doing it line by line (like an > > actual DIFF) or is it putting the lines into an "array" and the checking > > that array against the second file? > > > > We

Re: Algorithm Help Needed

2005-09-13 Thread Eric Walker
On Tuesday 13 September 2005 09:55 am, Jeff 'japhy' Pinyan wrote: > On Sep 13, Bob Showalter said: > > I need help with an algorithm. I'm writing a program that sends a > > repeated pattern of requests to a service. Each request has a "weight" > > that controls the relative frequency with which I n

Re: Comparing file contents (code included)

2005-09-13 Thread Wiggins d'Anconia
Robert wrote: > When Perl is doing this comparison is it doing it line by line (like an > actual DIFF) or is it putting the lines into an "array" and the checking > that array against the second file? > Well yes and no, to both. It is storing the lines temporarily, but it is storing them to a hash

Re: Comparing file contents (code included)

2005-09-13 Thread Robert
I did see my %dict error but my question is still the same. Robert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Use of uninitialized value

2005-09-13 Thread DBSMITH
do you want me to seed the entire program. it is over 700 lines? it on lines 246 for eaxmple. And anywhere I assign a variable to a q->param construct such as $which_import and $which_radio_button. thank you so much! Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams

Comparing file contents (code included)

2005-09-13 Thread Robert
When Perl is doing this comparison is it doing it line by line (like an actual DIFF) or is it putting the lines into an "array" and the checking that array against the second file? use strict; use warnings; open VASH, "vash.txt" or die "Can't open the file: $!\n"; open MONH, "monh.txt" or die "Ca

Re: Algorithm Help Needed

2005-09-13 Thread Jeff 'japhy' Pinyan
On Sep 13, Bob Showalter said: I need help with an algorithm. I'm writing a program that sends a repeated pattern of requests to a service. Each request has a "weight" that controls the relative frequency with which I need to send that particular request. foo => 1 bar => 1 qux => 6 fo

Algorithm Help Needed

2005-09-13 Thread Bob Showalter
Guys, I need help with an algorithm. I'm writing a program that sends a repeated pattern of requests to a service. Each request has a "weight" that controls the relative frequency with which I need to send that particular request. So given: foo => 1 bar => 3 I would send four requests, one

Re: local variabless vs my

2005-09-13 Thread Peter Scott
On Tue, 13 Sep 2005 06:09:22 -0700, Christopher Spears wrote: > I've been reading the following docs on Perl > subroutines: > > http://perldoc.perl.org/perlsub.html#Persistent-Private-Variables > > I just read the section on local variables and am > completely confused. What is a local variable?

local variabless vs my

2005-09-13 Thread Christopher Spears
I've been reading the following docs on Perl subroutines: http://perldoc.perl.org/perlsub.html#Persistent-Private-Variables I just read the section on local variables and am completely confused. What is a local variable? How is local $x different from my $x? -- To unsubscribe, e-mail: [EMAIL

Re: Infinite loop problem

2005-09-13 Thread John Doe
Vineet Pande am Dienstag, 13. September 2005 13.00: > Dear Perl Guru: > > I want to write a script which takes input a text file with sequence of > alphabets (amino acids) like GAGAGAGAGGA etc. and converts them to a > three letter corresponding code [G= GLY, A= ALA]. The output should be then

[Fwd: Re: Infinite loop problem]

2005-09-13 Thread Suvajit Sengupta
Hi Vineet, Since Perl provides strong feature of pattern matching of Regular Expn you should use that. Just read in the pattern GAGAGAGAGGA from the file and store it in a scalar variable. You can refer to the following perl code snippet for getting yout job done. #! /usr/bin/perl my $x

Re: Infinite loop problem

2005-09-13 Thread Chris Devers
On Tue, 13 Sep 2005, Xavier Noria wrote: > On Sep 13, 2005, at 13:00, Vineet Pande wrote: > > > for ( $position=0; $position < length $protein; ++$protein ) > > Look at the right, you are incrementing $protein instead of $position. And that's (part of) why the usual Perl idiom is to skip C sty

Re: Infinite loop problem

2005-09-13 Thread Xavier Noria
On Sep 13, 2005, at 13:00, Vineet Pande wrote: for ( $position=0; $position < length $protein; ++$protein ) Look at the right, you are incrementing $protein instead of $position. -- fxn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Infinite loop problem

2005-09-13 Thread Vineet Pande
Dear Perl Guru: I want to write a script which takes input a text file with sequence of alphabets (amino acids) like GAGAGAGAGGA etc. and converts them to a three letter corresponding code [G= GLY, A= ALA]. The output should be then written to another file. I wrote the following script, bu