Re: FAQ

2005-07-07 Thread madhurima das
Thanks for the reply sir. But i am still stuck with the same old problem since the system() function isn't working & the manpages aren't of much help either. Giving below an account of what my programs are & their output: PERL PROGRAM #assign.pl# #!/usr/bin/perl use strict; use warnings

Re: FAQ

2005-07-07 Thread madhurima das
Thanks for the reply sir. But i am still stuck with the same old problem since the system() function isn't working & the manpages aren't of much help either. Giving below an account of what my programs are & their output: PERL PROGRAM #assign.pl# #!/usr/bin/perl use strict; use warnings

Re: FAQ

2005-07-07 Thread madhurima das
Thanks for the reply sir. But i am still stuck with the same old problem since the system() function isn't working & the manpages aren't of much help either. Giving below an account of what my programs are & their output: PERL PROGRAM #assign.pl# #!/usr/bin/perl use strict; use warnings

RE: FAQ

2005-07-07 Thread Thomas Bätzler
madhurima das <[EMAIL PROTECTED]> asked: > Thanks for the reply sir. But i am still stuck with the same > old problem since the system() function isn't working & the > manpages aren't of much help either. system() won't work the way you want to use it. From the manpage: "The return value is the

Re: FAQ

2005-07-07 Thread Muthukumar
Can you try with backtick or qx[ ] ? my $z = `assign.f $x $y`; hth. > Can't exec "assign.f": Permission denied at assign > line 10, line 2. > Output of the two numbers is: > -1 --Muthu -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Query on File::Find

2005-07-07 Thread John Doe
Shobha Deepthi am Donnerstag, 7. Juli 2005 06.19: > Hi, Hi probably not the best answer, but nobody else answered: > Am using find method in File::Find module. > Right now this method is being used as follows: >find({wanted => \&find_and_instantiate_commav_file, > no_

Re: Query on File::Find

2005-07-07 Thread Jeff 'japhy' Pinyan
On Jul 7, Shobha Deepthi said: But I want to pass another parameter to find_and_instantiate_commav_file subroutine. I tried, find({wanted => \&find_and_instantiate_commav_file("some_value"), no_chdir => 0}, $spec_entry); The syntax \&function returns a r

Re: FAQ

2005-07-07 Thread Jeff 'japhy' Pinyan
On Jul 7, madhurima das said: #assign.pl# #!/usr/bin/perl use strict; use warnings; print "enter the first number\n"; my $x = ; chomp $x; print "enter the second number\n"; my $y = ; chomp $y; my $z = system("assign.f",'$x','$y'); Many things wrong here: 1. system() does NOT return the OUTPUT

Re: Yet another question on perl modules

2005-07-07 Thread Xavier Noria
On Jul 7, 2005, at 8:16, Peter Rabbitson wrote: Hello everyone, Most modules I run across have a BEGIN block containing some variable declarations, module loaders etc. Although I understand what BEGIN is (code being evaluated immediately after it is parsed), I miss the point of the excercise.

Re: Query on File::Find

2005-07-07 Thread Shobha Deepthi
Hi Jeff, Thanks for your help. That really worked! Shobha Deepthi V The statement below is true. The statement above is false. Jeff 'japhy' Pinyan wrote: On Jul 7, Shobha Deepthi said: But I want to pass another parameter to find_and_instantiate_commav_file subroutine. I tried, fin

query

2005-07-07 Thread madhurima das
Sir, I have the following problem: I need a perl program which asks the user to input two numbers x & y. The program next calls a fortran program to do some calculations with the two numbers x & y & sends the output z back to the perl program. The perl program next conveys this output z to th

Re: query

2005-07-07 Thread Chris Devers
On Thu, 7 Jul 2005, madhurima das wrote: > I have the following problem: Yes. We saw it each of the previous times you posted it. While you were posting this message twice and another one three times -- please don't ever do that again, by the way, thanks -- you got back several useful respons

RE: query

2005-07-07 Thread Thomas Bätzler
madhurima das <[EMAIL PROTECTED]> wrote: > I have the following problem: Looks like the previous time you posted this. [...] > my @z = system("assign.f",'$x','$y'); [...] Read the perlfunc manpage on system. 1. system does return a scalar. 2. that scalar is not the output of the program you c

Re: Atmoic operations in Multi-threaded Perl?

2005-07-07 Thread Dave Gray
On 7/6/05, Siegfried Heintze <[EMAIL PROTECTED]> wrote: > Can I assume that an auto-increment operation on an integer value is atomic > (that is, cannot be interrupted by another thread)? This is a common > assumption in C/C++. The perl debugger I use leads me to believe that perl > stores all int

RE: Intelligent Sorting

2005-07-07 Thread Ryan Frantz
> Here is one way to approach: > !perl > > use strict; > use warnings; > > my %AlphaToNbr = qw(jan 1 feb 2 mar 3 apr 4 may 5 jun 6 jul 7 aug 8 sep 9 > oct 10 nov 11 dec 12); > foreach my $MySortedFile (sort { $a->[1] <=> $b->[1] > or >$AlphaToNbr{lc($a->[2])} <=> $Alph

RE: Intelligent Sorting

2005-07-07 Thread Jeff 'japhy' Pinyan
On Jul 7, Ryan Frantz said: foreach my $MySortedFile (sort { $a->[1] <=> $b->[1] or $AlphaToNbr{lc($a->[2])} <=> $AlphaToNbr{lc($b- [2])} or $a->[3] <=> $b->[3] } map {[$_, /^.(\d{4})(\w{3})(\d

RE: Intelligent Sorting

2005-07-07 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Ryan Frantz wrote: >> Here is one way to approach: >> !perl >> >> use strict; >> use warnings; >> >> my %AlphaToNbr = qw(jan 1 feb 2 mar 3 apr 4 may 5 jun 6 jul 7 aug 8 >> sep 9 oct 10 nov 11 dec 12); foreach my $MySortedFile (sort { >> $a->[1] <=> $b->[1] >> or >>$Al

RE: Intelligent Sorting

2005-07-07 Thread Ryan Frantz
> Just take and replace that with @user_links. The code should > look like: >@user_links = ( sort { > $a->[1] <=> $b->[1] >or > $AlphaToNumber{lc($a->[2])} <=> $AlphaToNumber{lc($b->[2])} >or > $a->[3] <=> $b->[3] >} >map {[$_, /^.(\d{4})(\w{3})(\d{

Re: Intelligent Sorting

2005-07-07 Thread Wiggins d'Anconia
Ryan Frantz wrote: [snip] > > Many thanks to Wags and japhy; I've really learned a lot from the both > of you. I'm off the pick up 'Programming Perl' after I finish 'Learning > Perl'... > > ry > Pick up the Learning Perl Object, References, and Modules book before picking up Programming Perl,

Module memory usage

2005-07-07 Thread Scott R. Godin
what are the various ways of finding out how much memory a particular module is using, from the command line under Linux ? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Module memory usage

2005-07-07 Thread Chris Devers
On Thu, 7 Jul 2005, Scott R. Godin wrote: > what are the various ways of finding out how much memory a particular > module is using, from the command line under Linux ? A lot the modules in the B:: and Devel:: namespaces can get at this sort of information. The Devel::Size module can get at th

Re: Intelligent Sorting

2005-07-07 Thread Scott R. Godin
Jeff 'japhy' Pinyan wrote: On Jul 6, Ryan Frantz said: I'm working on a script that will generate a listing of files on a regular basis so that I can create hyperlinks to each respective file. As you see from the sorted output below, though it is in ASCIIbetical order, it is not in chronologica

Re: Form / CGI error

2005-07-07 Thread Ron Smith
--- Chris Devers <[EMAIL PROTECTED]> wrote: > On Wed, 6 Jul 2005, Ron Smith wrote: > > > I'm getting an error when I submit the following > html form to a CGI > > script. > > Let's focus on the script, not the HTML. > > Once you've verified that the script works, at least > on a basic level --

Query about "ssh" from perl program

2005-07-07 Thread Dhanashri Bhate
Hello All, I have a query about using "ssh" programmatically. I tried using both system and exec, but didn't work. I mean, I wanted some processing to happen on the remote machine to which i connect with "ssh", which is not happening. I have copied the code below. Kindly help or suggest any o