Re: regd . Line number printing...

2007-07-10 Thread mayank . ahuja
Hi Paul I don't think so.In my mail I was so much rude , but if you still feel so then I want to apologize. regards Mayank Paul Lalli <[EMAIL PROTECTED]> 07/10/2007 11:14 PM To beginners@perl.org cc Subject Re: regd . Line number printing... On Jul 10, 8:24 am, [EMAIL PROTECTED

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

2007-07-10 Thread yaron
Hi, I am looking for an efficient way to get list of child (forked) processes of a given processes id. Has anyone idea how to do it in "pure perl style" ? Thanks in advance, Yaron Kahanovitch -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Fw: Help needed created this data structure

2007-07-10 Thread Chris Charley
- Original Message - From: "Chris Charley" <[EMAIL PROTECTED]> To: "klute" <[EMAIL PROTECTED]> Sent: Tuesday, July 10, 2007 7:17 PM Subject: Re: Help needed created this data structure - Original Message - From: "klute" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "k

Re: For Loop error: Missing $ on loop variable at time.pl line 7.

2007-07-10 Thread Dr.Ruud
Gowtham schreef: > Martin Barth: >>> for my ($index = 0; $index <= 10; $index++) { >>>print ("$hour:$min:$sec\n"); >>> } >> >> for my $index (0..10){ >> print ("$hour:$min:$sec\n"); >> } > > Don't wrap the entire loop initializer, condition and > counter update in my(). [...] Gowtham,

Re: regd . Line number printing...

2007-07-10 Thread Gowtham
On Jul 10, 5:24 pm, [EMAIL PROTECTED] (Mayank Ahuja) wrote: > Hi Perlers > > cud u plz tell me what wrong in this : > > #!/usr/bin/perl > use strict; > use warnings; > print "Enter the File name \n"; > my $input_file = ; > chomp($input_file) ; > open FH,$input_file or die "Can not open the file a

Re: su and password in a Perl script

2007-07-10 Thread Tom Phoenix
On 7/9/07, Lakshmi Sailaja <[EMAIL PROTECTED]> wrote: It is not a single command that I am supposed to run. I have to change to a different user and run a couple of commands. Well, you could use sudo to launch a shell, such as /bin/sh or csh or bash, and then use that shell to run commands. Bu

Re: Apache::Authcookie

2007-07-10 Thread Tom Phoenix
On 7/9/07, Alma <[EMAIL PROTECTED]> wrote: Its working fine as for the first time when we restart apache server but if we provide invalid users it dispalys the source code of the index.html for which i have this leftpanel-login.mas as a part. If your webserver is sending source code instead of

Re: Help needed created this data structure

2007-07-10 Thread klute
--- klute <[EMAIL PROTECTED]> wrote: > > --- "D. Bolliger" <[EMAIL PROTECTED]> wrote: > > > klute am Montag, 9. Juli 2007 23:04: > > > --- Chris Charley <[EMAIL PROTECTED]> wrote: > > > > - Original Message - > > > > From: "klute" <[EMAIL PROTECTED]> > > > > Newsgroups: perl.beginners >

Re: regd . Line number printing...

2007-07-10 Thread Gowtham
On Jul 10, 5:24 pm, [EMAIL PROTECTED] (Mayank Ahuja) wrote: > Hi Perlers > > cud u plz tell me what wrong in this : > > #!/usr/bin/perl > use strict; > use warnings; > print "Enter the File name \n"; > my $input_file = ; > chomp($input_file) ; > open FH,$input_file or die "Can not open the file a

Re: For Loop error: Missing $ on loop variable at time.pl line 7.

2007-07-10 Thread Gowtham
On Jul 10, 9:13 pm, [EMAIL PROTECTED] (Martin Barth) wrote: > > for my ($index = 0; $index <= 10; $index++) { > > > print ("$hour:$min:$sec\n"); > > > } > > for my $index (0..10){ > print ("$hour:$min:$sec\n"); > > } > > hth Don't wrap the entire loop initializer, condition and counter upd

Re: Simple perl math caculation question

2007-07-10 Thread Vincent Li
On Tue, 10 Jul 2007, Chas Owens wrote: On 7/10/07, Vincent Li <[EMAIL PROTECTED]> wrote: I am trying to experiment a simple perl math caculation script I wrote: #!/usr/bin/perl use strict; use warnings; my %operator = ( minus => '-', add => '+', multiply => '*',

Re: Simple perl math caculation question

2007-07-10 Thread Martin Barth
On Tue, 10 Jul 2007 11:32:54 -0700 (PDT) Vincent Li <[EMAIL PROTECTED]> wrote: > > I am trying to experiment a simple perl math caculation script I wrote: > > #!/usr/bin/perl > use strict; > use warnings; > > my %operator = ( > minus => '-', > add => '+', > multiply => '*', >

Re: Simple perl math caculation question

2007-07-10 Thread Chas Owens
On 7/10/07, Vincent Li <[EMAIL PROTECTED]> wrote: I am trying to experiment a simple perl math caculation script I wrote: #!/usr/bin/perl use strict; use warnings; my %operator = ( minus => '-', add => '+', multiply => '*', divide => '/', ); my $big = 5; my $small = 2; fo

Re: Simple perl math caculation question

2007-07-10 Thread Paul Lalli
On Jul 10, 2:32 pm, [EMAIL PROTECTED] (Vincent Li) wrote: > I am trying to experiment a simple perl math caculation script I wrote: > > #!/usr/bin/perl > use strict; > use warnings; > > my %operator = ( > minus => '-', > add => '+', > multiply => '*', > divide => '/', > ); > > m

Simple perl math caculation question

2007-07-10 Thread Vincent Li
I am trying to experiment a simple perl math caculation script I wrote: #!/usr/bin/perl use strict; use warnings; my %operator = ( minus => '-', add => '+', multiply => '*', divide => '/', ); my $big = 5; my $small = 2; for (values %operator) { my $result = $big $_ $small;

Re: Hash in a scalar context

2007-07-10 Thread Paul Lalli
On Jul 10, 12:10 pm, [EMAIL PROTECTED] (Gowtham) wrote: > Interestingly, A hash in a scalar context returns some fraction. > > Like, this code > > @array = ( 1 .. 100 ); > %hash = @array; > print scalar %hash, "\n"; > > prints > > 33/64 > > Can somebody help me understand what this 33/64 is? Yes.

Re: regd . Line number printing...

2007-07-10 Thread Paul Lalli
On Jul 10, 8:24 am, [EMAIL PROTECTED] (Mayank Ahuja) wrote: > cud u plz tell me what wrong in this : Could you please talk like an adult? Not only do you give the impression that you're 10 years old, you are rude to non-native speakers of the English language who could possibly help you. > #!/us

Re: regd . Line number printing...

2007-07-10 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hi Perlers Hello, cud u plz tell me what wrong in this : Could you please use proper English? #!/usr/bin/perl use strict; use warnings; print "Enter the File name \n"; my $input_file = ; chomp($input_file) ; open FH,$input_file or die "Can not open the file at $

Re: Hash in a scalar context

2007-07-10 Thread Mr. Shawn H. Corey
Gowtham wrote: Interestingly, A hash in a scalar context returns some fraction. Like, this code @array = ( 1 .. 100 ); %hash = @array; print scalar %hash, "\n"; prints 33/64 Can somebody help me understand what this 33/64 is? Thanks Gowtham It means that the hash has used 33 buckets of

Re: For Loop error: Missing $ on loop variable at time.pl line 7.

2007-07-10 Thread Mr. Shawn H. Corey
CM Analyst wrote: for my ($index = 0; $index <= 10; $index++) { for (my $index = 0; $index <= 10; $index ++ ) { --- Shawn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: regd . Line number printing...

2007-07-10 Thread Mr. Shawn H. Corey
[EMAIL PROTECTED] wrote: Hi Perlers cud u plz tell me what wrong in this : #!/usr/bin/perl use strict; use warnings; print "Enter the File name \n"; my $input_file = ; chomp($input_file) ; open FH,$input_file or die "Can not open the file at $!" ; my @lines = ; while () print $. ; } close(FH

Re: Hash in a scalar context

2007-07-10 Thread Jenda Krynicky
> Interestingly, A hash in a scalar context returns some fraction. > > Like, this code > > @array = ( 1 .. 100 ); > %hash = @array; > print scalar %hash, "\n"; > > prints > > 33/64 > > Can somebody help me understand what this 33/64 is? perldoc perldata ... If you evaluate a hash in scalar c

Hash in a scalar context

2007-07-10 Thread Gowtham
Interestingly, A hash in a scalar context returns some fraction. Like, this code @array = ( 1 .. 100 ); %hash = @array; print scalar %hash, "\n"; prints 33/64 Can somebody help me understand what this 33/64 is? Thanks Gowtham -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

regd . Line number printing...

2007-07-10 Thread mayank . ahuja
Hi Perlers cud u plz tell me what wrong in this : #!/usr/bin/perl use strict; use warnings; print "Enter the File name \n"; my $input_file = ; chomp($input_file) ; open FH,$input_file or die "Can not open the file at $!" ; my @lines = ; while () print $. ; } close(FH); But its neither printi

Re: For Loop error: Missing $ on loop variable at time.pl line 7.

2007-07-10 Thread Martin Barth
> for my ($index = 0; $index <= 10; $index++) { > > print ("$hour:$min:$sec\n"); > > } for my $index (0..10){ print ("$hour:$min:$sec\n"); } hth -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

For Loop error: Missing $ on loop variable at time.pl line 7.

2007-07-10 Thread CM Analyst
Hello. I have this code that works fine without the for loop but fails with it with this error message: "Missing $ on loop variable at time.pl line 7." Here's the code itself: ### use strict; use warnings; use Time::Local; my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst

Re: Help needed created this data structure

2007-07-10 Thread klute
--- "D. Bolliger" <[EMAIL PROTECTED]> wrote: > klute am Montag, 9. Juli 2007 23:04: > > --- Chris Charley <[EMAIL PROTECTED]> wrote: > > > - Original Message - > > > From: "klute" <[EMAIL PROTECTED]> > > > Newsgroups: perl.beginners > > > To: > > > Sent: Monday, July 09, 2007 4:20 PM > >

Apache::Authcookie

2007-07-10 Thread Alma
Hi All, I am having difficulty in implementing Authcookie concepts in my project. I am using mason components so my loginscript says likt this. Here is my conf file. PerlModule HTML::Mason::ApacheHandler PerlModule PosterJournal::AuthCookieHandler SetHandler perl-scr