How to browse and select a remote file and then return the filename

2005-07-07 Thread Neville Hodder
I am in the process of learning how to use the CGI.pm module but can not find a method that will allow me to simply choose a 'remote' file. I need to be able to return the value path+filename of a file that the user has browsed to using something like the standard HTML form type: PINPUT

Re: How to browse and select a remote file and then return the filename

2005-07-07 Thread David Dorward
On Thu, Jul 07, 2005 at 03:00:02PM +0100, Neville Hodder wrote: I am in the process of learning how to use the CGI.pm module but can not find a method that will allow me to simply choose a 'remote' file. I need to be able to return the value path+filename of a file that the user has browsed to

Re: How to browse and select a remote file and then return the filename

2005-07-07 Thread Chris Devers
On Thu, 7 Jul 2005, David Dorward wrote: On Thu, Jul 07, 2005 at 03:00:02PM +0100, Neville Hodder wrote: I am in the process of learning how to use the CGI.pm module but can not find a method that will allow me to simply choose a 'remote' file. I need to be able to return the value

Re: How to browse and select a remote file and then return the filename

2005-07-07 Thread David Dorward
On Thu, Jul 07, 2005 at 11:42:29AM -0400, Chris Devers wrote: It isn't possible. For that sort of thing you'll need something like an ActiveX control with permission to read the user's file system. (Or to get the user to type the path to the file). And that, in turn, can only be reliable

RE: How to browse and select a remote file and then return the filename

2005-07-07 Thread Hellman, Matthew
Do you mean you just don't want the actual file uploaded...just the name of it? You can probably accomplish this by having the file form field in a separate form (that is not submitted). Then use javascript to populate the field in the form that actually does get submitted. -Original

Re: How to browse and select a remote file and then return the filename

2005-07-07 Thread Chris Devers
On Thu, 7 Jul 2005, David Dorward wrote: On Thu, Jul 07, 2005 at 11:42:29AM -0400, Chris Devers wrote: It isn't possible. For that sort of thing you'll need something like an ActiveX control with permission to read the user's file system. (Or to get the user to type the path to the

Re: How to browse and select a remote file and then return the filename

2005-07-07 Thread Bill Stephenson
On Jul 7, 2005, at 9:00 AM, Neville Hodder wrote: I am in the process of learning how to use the CGI.pm module but can not find a method that will allow me to simply choose a 'remote' file. I need to be able to return the value path+filename of a file that the user has browsed to using

Yet another question on perl modules

2005-07-07 Thread Peter Rabbitson
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. For example: package csv_generator; use

Re: Yet another question on perl modules

2005-07-07 Thread Peter Rabbitson
On Thu, Jul 07, 2005 at 02:22:34AM -0400, Casey West wrote: This is a confusing question, but I think the answer is that a BEGIN block would come into play before any of these things are executed. -- Casey West Sorry :) Question is: why would I want to use a BEGIN block in the above

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 exit

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, STDIN 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_chdir

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

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 = STDIN; chomp $x; print enter the second number\n; my $y = STDIN; chomp $y; my $z = system(assign.f,'$x','$y'); Many things wrong here: 1. system() does NOT return the

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

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,

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 the

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

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

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 integers

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])} = $AlphaToNbr{lc($b-

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{2})/]}

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 $AlphaToNbr{lc($a-[2])} =

RE: Intelligent Sorting

2005-07-07 Thread Ryan Frantz
Just take DATA 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{2})/]}

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, it

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] http://learn.perl.org/ http://learn.perl.org/first-response

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

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

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 -- i.e. you

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