Re: system command not working in different versions

2012-08-09 Thread Shawn H Corey
On Thu, 9 Aug 2012 12:20:33 + Bob McConnell wrote: > My first step would be to log into the problem machine as the same > user the command runs under, then try to run it manually. The error > messages there should point you toward the problem. If it runs, then > there has to be a difference i

RE: system command not working in different versions

2012-08-09 Thread Bob McConnell
> From: Shawn H Corey > > On Thu, 9 Aug 2012 15:17:57 +0800 (SGT) > venki neeli wrote: > > > What may be the problem? is it with version of perl? or perl module > > problem? > > It may be a difference in the shell. When there are metacharacters > present, system uses sh(1) to interpret them. Tr

Re: system command not working in different versions

2012-08-09 Thread Shawn H Corey
On Thu, 9 Aug 2012 15:17:57 +0800 (SGT) venki neeli wrote: > What may be the problem? is it with version of perl? or perl module > problem? It may be a difference in the shell. When there are metacharacters present, system uses sh(1) to interpret them. Try this on your machines to see if they're

Re: system command not working in different versions

2012-08-09 Thread Paul Anderson
> > From: midhun > To: Hal Wigoda > Cc: venki neeli ; perl list > Sent: Thursday, 9 August 2012 12:01 PM > Subject: Re: system command not working in different versions > > Neeli, Hal is right. Try $which perl from your shell. The location

Re: system command not working in different versions

2012-08-09 Thread venki neeli
roblem? is it with version of perl? or perl module problem? Regards, Neeli From: midhun To: Hal Wigoda Cc: venki neeli ; perl list Sent: Thursday, 9 August 2012 12:01 PM Subject: Re: system command not working in different versions Neeli, Hal is right.

Re: system command not working in different versions

2012-08-08 Thread midhun
> > > > > From: midhun > > To: venki neeli > > Cc: perl list > > Sent: Wednesday, 8 August 2012 3:55 PM > > Subject: Re: system command not working in different versions > > > > One suggestion. Did you compare

Re: system command not working in different versions

2012-08-08 Thread Hal Wigoda
ow.pl) are in same location. > > Regards, > Neeli > > > > From: midhun > To: venki neeli > Cc: perl list > Sent: Wednesday, 8 August 2012 3:55 PM > Subject: Re: system command not working in different versions > > One suggestion. Did

Re: system command not working in different versions

2012-08-08 Thread Owen
> From: midhun > To: venki neeli > Cc: perl list > Sent: Wednesday, 8 August 2012 3:55 PM > Subject: Re: system command not working in different versions > > One suggestion. Did you compare the shebang line of your submit_now.pl > and > your perl executable loca

Re: system command not working in different versions

2012-08-08 Thread venki neeli
August 2012 3:55 PM Subject: Re: system command not working in different versions One suggestion. Did you compare the shebang line of your submit_now.pl and your perl executable location in the 2nd machine where it is not working. Regards, Midhun On Wed, Aug 8, 2012 at 11:48 AM, venki neeli

Re: system command not working in different versions

2012-08-08 Thread Shawn H Corey
On Wed, 8 Aug 2012 15:55:34 +0530 midhun wrote: > One suggestion. Did you compare the shebang line of your > submit_now.pl and your perl executable location in the 2nd machine > where it is not working. > > Regards, > Midhun > > On Wed, Aug 8, 2012 at 11:48 AM, venki neeli > wrote: > > > Dear

Re: system command not working in different versions

2012-08-08 Thread midhun
One suggestion. Did you compare the shebang line of your submit_now.pl and your perl executable location in the 2nd machine where it is not working. Regards, Midhun On Wed, Aug 8, 2012 at 11:48 AM, venki neeli wrote: > Dear Friends, > > I am developing a script in which I need to call another pe

Re: system command not working in different versions

2012-08-07 Thread Jeff Pang
You might want to tell us what's the output for error. Some reasons include the file path, the permissions etc. I am developing a script in which I need to call another perl script. In one linux machine it is working and in the other machine it is not working. Ex:- system("./submit_now.pl $xx

RE: system command question

2011-09-28 Thread Ken Slater
> -Original Message- > From: Amish Rughoonundon [mailto:amishrughoonun...@gmail.com] > Sent: Tuesday, September 27, 2011 4:44 PM > To: beginners@perl.org > Subject: system command question > > Hi, > I am trying to run a make file from perl. For the make file to run, > some environment var

Re: system command

2008-11-26 Thread Sharan Basappa
> Or you might want to use threads, though they are certainly not the same > both have their advantages and you might want to read up on them before > making a decission on which to use. > > In any case I would advise you to first, use which ever way of modeling you > prefer, to draw out the way th

Re: system command

2008-11-26 Thread Deviloper
It will wait. This behaviour is called "blocking". If you want to just start it and the go on in your code "non-blocking" or If you want to do some tasks "at the same time", you should take a look at fork, threads or easier Proc::ParallelLoop. But If the bottleneck is your computingpower, this wi

Re: system command

2008-11-26 Thread Rob Coops
On Wed, Nov 26, 2008 at 4:21 PM, Jeff Pang <[EMAIL PROTECTED]> wrote: > > Message du 26/11/08 16:13 > > De : "Sharan Basappa" > > A : "Perl Beginners" > > Copie à : > > Objet : system command > > > > > > Hi, > > > > I am trying to launch a program using system command. > > The program usually take

Re: system command

2008-11-26 Thread Mr. Shawn H. Corey
On Wed, 2008-11-26 at 20:43 +0530, Sharan Basappa wrote: > Hi, > > I am trying to launch a program using system command. > The program usually takes 20-30 minutes to complete. > I launch the programs in a loop. > Will the system command wait for first program to complete and then proceed > to the

Re: system() command with a time limit

2006-12-24 Thread Jeff Pang
Using eval. eval { local $SIG{ALRM} = sub {die "something is wrong"}; alarm 30; do_something... alarm 0; }; if ($@) { handle_for_the_errors(); } -Original Message- >From: Kelly Jones <[EMAIL PRO

Re: "system" command help

2005-11-10 Thread Shawn Corey
Marilyn Sander wrote: On Nov 9, 2005, at 4:52 PM, Pablo Wolter wrote: The system function call returns a boolean value as return value, I don't remember if 1 is for fail and 0 for success or viceversa. Actually it is not a boolean value. It is a two-byte value, and each byte is an integer.

Re: "system" command help

2005-11-09 Thread Rakesh Mishra
On 11/10/05, Marilyn Sander <[EMAIL PROTECTED]> wrote: > > > On Nov 9, 2005, at 4:52 PM, Pablo Wolter wrote: > > > The system function call returns a boolean value as return value, I > > don't > > remember if 1 is for fail and 0 for success or viceversa. > > Actually it is not a boolean value. It i

Re: "system" command help

2005-11-09 Thread Marilyn Sander
On Nov 9, 2005, at 4:52 PM, Pablo Wolter wrote: The system function call returns a boolean value as return value, I don't remember if 1 is for fail and 0 for success or viceversa. Actually it is not a boolean value. It is a two-byte value, and each byte is an integer. You need to look up t

Re: "system" command help

2005-11-09 Thread Pablo Wolter
The system function call returns a boolean value as return value, I don't remember if 1 is for fail and 0 for success or viceversa. I think your mistake is the lack of the test construction like if, so if (system("$addgroup \"$group\"") == 0) { ... do something ... } I'm not in a box with perl t

Re: system() command

2004-06-08 Thread John W. Krahn
June Tantoolvesm wrote: > > Hi, Hello, > I hope this is the right mailing list. I have two > questions. > > 1. I was wondering if anyone here knows what this > command is doing, besides calling the program > "neighbor"? > > system ("neighbor >/dev/null 2>&1 << ! $inpwd 2 3 Y > !") > > I under

RE: system() command

2004-06-08 Thread Tim Johnson
Before going any further, you might want to tell us what operating system you are using. As far as I know, the << operator can be used to feed a program certain input as if it came from STDIN, but I've never used it because it always sounded a bit kludgy to me. -Original Message- From:

Re: system command to perl variable

2002-08-13 Thread Sudarshan Raghavan
On Wed, 14 Aug 2002, Jose Malacara wrote: > Hello. I was wondering if there is a way to capture a system command into a > perl variable. I know this is incorrect, but I basically want to do something > like this: > > $date = system("date"); > print "Today is $date."; You can use backticks ins

RE: system command interraction

2002-06-04 Thread Kipp, James
>try: >-- >#!/usr/bin/perl > >$date = `date +%y%m%e`; >$backup_dest = "/backup/home/" . "$date" . "-monthly"; >$archive_dest = "/backup/home/archives/" . "$date" . "-monthly"; >$backup_target = "/home/"; >$level = '0'; > >$cmd = "dump -$level -u -A $archive_dest -f $backup_dest -j 9 >$backup_targ

RE: system command interraction

2002-06-04 Thread Jeff 'japhy' Pinyan
On Jun 4, Kipp, James said: >$date = `date +%y%m%e`; >$backup_dest = "/backup/home/" . "$date" . "-monthly"; Needless quoting of $date, and there's no reason to separate $date from the rest of the string: $backup_dest = "/backup/home/$date-monthly"; >$archive_dest = "/backup/home/archives/"

Re: system command interraction

2002-06-04 Thread Jeff 'japhy' Pinyan
On Jun 4, Mat Harris said: >I want to issue the command to the command line, including the values of >these vars. I have tried backticking and the system('command here') but >they just send the vars as empty strings. Here's the program: #!/usr/bin/perl $date = `date +%y%m%e`; $backup_d

RE: system command interraction

2002-06-04 Thread Kipp, James
try: -- #!/usr/bin/perl $date = `date +%y%m%e`; $backup_dest = "/backup/home/" . "$date" . "-monthly"; $archive_dest = "/backup/home/archives/" . "$date" . "-monthly"; $backup_target = "/home/"; $level = '0'; $cmd = "dump -$level -u -A $archive_dest -f $backup_dest -j 9 $backup_target"; system

RE: system command problem

2002-03-16 Thread Gavin Nelmes-Crocker [CobaltWorld]
> This is very dangerous: > > http://someserver.com/cgi-bin/script.pl?ls%3Brm%20-fr%20%2F%3B > > With that url, you'll be executing the following: > > system("/usr/bin/fms_registration ls;rm -fr /; /usr/bin/fmserverd"); > Curtis thanks for the pointer I am aware that a few changes need to be

Re: system command problem

2002-03-15 Thread Curtis Poe
--- "Gavin Nelmes-Crocker [CobaltWorld]" <[EMAIL PROTECTED]> wrote: > Guys, I've got a newbie question - I have been hacking at a perl script to > change it to do what I want - it nearly does but I can't understand why the > main bit isn't working. Basically the script gets sent a string from an

Re: "system" command failure

2001-09-12 Thread Robert Citek
Hello Tyler, A return value of 0 from a system call means that it ran successfully. Any other value means something went wrong. For example, this script: #!/usr/bin/perl -w use strict; my $system; $system = system("echo Hello, World"); print $system . "\n"; $system = system("grok

Re: "system" command failure

2001-09-12 Thread Maxim Berlin
Hello Tyler, Thursday, September 13, 2001, Tyler Cruickshank <[EMAIL PROTECTED]> wrote: TC> Hello. I am trying to use the system command to run a FORTRAN TC> program on my Solaris 5.7 system. In the code pasted below the TC> following system call: TC> system("chmod 777 /trinidad/uama

RE: System Command to call an external command.

2001-08-28 Thread Kipp, James
Have you configured a cgi-bin directory in IIS to recognize scripts with a .pl or .cgi extension ? > -Original Message- > From: Ackim Chisha [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 28, 2001 12:48 PM > To: [EMAIL PROTECTED] > Subject: System Command to call an external command.