Re: about system() call

2018-07-24 Thread Lauren C.
yes I also found a more direct way, use Image::Resize; $image = Image::Resize->new('large.jpg'); $gd = $image->resize(250, 250); thanks for everyone. On 2018/7/25 星期三 PM 1:51, Илья Рассадин wrote: You can resize image with Perl. For example, Imager library can do the thing. See https://metacp

Re: about system() call

2018-07-24 Thread Илья Рассадин
Hi! You can resize image with Perl. For example, Imager library can do the thing. See https://metacpan.org/pod/distribution/Imager/lib/Imager/Transformations.pod#scale() On 7/25/18 4:56 AM, Lauren C. wrote: Thanks for all kind answers. I have another question that, though this is maybe hard

Re: about system() call

2018-07-24 Thread Uri Guttman
On 07/24/2018 09:56 PM, Lauren C. wrote: Thanks for all kind answers. I have another question that, though this is maybe hard, I want to resize batch of images, from the large scale to small one, i.e, this image: https://miscnote.net/wp-content/uploads/2018/07/lauren.jpg (sorry but this is in

Re: about system() call

2018-07-24 Thread Lauren C.
Thanks for all kind answers. I have another question that, though this is maybe hard, I want to resize batch of images, from the large scale to small one, i.e, this image: https://miscnote.net/wp-content/uploads/2018/07/lauren.jpg (sorry but this is indeed me) currently I use system() in perl t

Re: about system() call

2018-07-24 Thread Uri Guttman
On 07/24/2018 08:35 AM, Lauren C. wrote: Hi, $ perl -le 'system "df -h"' $ perl -le 'system "df","-h"' The both two styles work fine. what's the difference between them and which is better usage? this is a more technical answer than the others but it may be useful to you or other readers.

Re: about system() call

2018-07-24 Thread Darryl Philip Baker
s@perl.org" Subject: Re: about system() call The first spawns a shell and can handle things like globs. This is less efficient, more powerful, and more dangerous (susceptible to code injection attacks) The second does not spawn a shell and therefore cannot handle globs. It is als

Re: about system() call

2018-07-24 Thread Chas. Owens
The first spawns a shell and can handle things like globs. This is less efficient, more powerful, and more dangerous (susceptible to code injection attacks) The second does not spawn a shell and therefore cannot handle globs. It is also less susceptible to code injection attacks. system "ls *.p

about system() call

2018-07-24 Thread Lauren C.
Hi, $ perl -le 'system "df -h"' $ perl -le 'system "df","-h"' The both two styles work fine. what's the difference between them and which is better usage? thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.pe

Re: what's the problem with a system call

2013-05-16 Thread Manuel Reimer
Shlomi Fish wrote: What system() does (at least on UNIX-like OSes) is fork a child, call exec() with a new process and wait for the new child to terminate (plus some other stuff to get rid of misbehaviours). ... and if you call "system" with just one long string, then Perl opens the system def

Re: what's the problem with a system call

2013-05-14 Thread Shlomi Fish
Hi xiaolan, On Tue, 14 May 2013 18:51:51 +0800 xiaolan wrote: > Thanks all the answers. > Shlomi long time no see :) Yes. :-) I am available on IM: http://www.shlomifish.org/me/contact-me/ > > Have another question that, what's the difference between the system call > c

Re: what's the problem with a system call

2013-05-14 Thread xiaolan
Thanks all the answers. Shlomi long time no see :) Have another question that, what's the difference between the system call child process and the native forked child process? Does the child process of system call have the problems of receiving signals from the parent? On Tue, May 14,

Re: what's the problem with a system call

2013-05-14 Thread Shlomi Fish
Hi Brian, thanks for replying well to xiaolan’s question. Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ My Public Domain Photos - http://www.flickr.com/photos/shlomif/ 95% of Programmers consider

Re: what's the problem with a system call

2013-05-14 Thread Brian Fraser
On Tue, May 14, 2013 at 12:35 AM, xiaolan wrote: > Hello, > > what's the disadvantage when calling a system command from Perl? > i.e, system call to "rsync" rather than using the File::Rsync module. > is it hard to control the signals between the caller process a

Re: what's the problem with a system call

2013-05-13 Thread Luca Ferrari
On Tue, May 14, 2013 at 5:35 AM, xiaolan wrote: > Hello, > > what's the disadvantage when calling a system command from Perl? > i.e, system call to "rsync" rather than using the File::Rsync module. > is it hard to control the signals between the caller process a

what's the problem with a system call

2013-05-13 Thread xiaolan
Hello, what's the disadvantage when calling a system command from Perl? i.e, system call to "rsync" rather than using the File::Rsync module. is it hard to control the signals between the caller process and the called system command? Thanks.

Re: Setting SIG{CHLD} to IGNORE in fork() changes result of system() call

2010-05-18 Thread C.DeRykus
t;256 in /tmp/res.txt), did you the check_ping docs for conditions that generate errors..? Does that particular check_ping call run ok from the command line? If you're trying to avoid a zombie and don't want to simply comment out the signal ignore, why not just do a wait, since the '

Setting SIG{CHLD} to IGNORE in fork() changes result of system() call

2010-05-17 Thread Kelly Jones
These 3 lines of code: if (fork()) {sleep 10; exit(0);} $SIG{'CHLD'} = 'IGNORE'; exit(system("/usr/lib/nagios/plugins/check_ping -H google.com -w 500,20% -c 1000,40% 1> /tmp/stdout.txt 2> /tmp/stderr.txt; echo $? > /tmp/res.txt")); return "PING WARNING - Packet loss = 0%, RTA = 62.08 ms|rta=62.07

Re: system() call in END() subroutine overrides script exit value

2010-05-17 Thread Marilyn Sander
I On May 17, 2010, at 11:21 AM, John W. Krahn wrote: > John W. Krahn wrote: >> Kelly Jones wrote: >>> I did this in tcsh: >>> perl -le 'exit(2); sub END {system("date");}' ; echo $status >>> Mon May 17 11:09:43 MDT 2010 >>> 0 >>> >>> In other words, the return value of the date command in

Re: system() call in END() subroutine overrides script exit value

2010-05-17 Thread John W. Krahn
John W. Krahn wrote: Kelly Jones wrote: I did this in tcsh: perl -le 'exit(2); sub END {system("date");}' ; echo $status Mon May 17 11:09:43 MDT 2010 0 In other words, the return value of the date command in an END subroutine overrides my desired exit value. How do I fix this? I want to tel

Re: system() call in END() subroutine overrides script exit value

2010-05-17 Thread Paul Johnson
On Mon, May 17, 2010 at 11:54:32AM -0600, Kelly Jones wrote: > I did this in tcsh: > > > perl -le 'exit(2); sub END {system("date");}' ; echo $status > Mon May 17 11:09:43 MDT 2010 > 0 > > In other words, the return value of the date command in an END subroutine > overrides my desired exit value.

Re: system() call in END() subroutine overrides script exit value

2010-05-17 Thread John W. Krahn
Kelly Jones wrote: I did this in tcsh: perl -le 'exit(2); sub END {system("date");}' ; echo $status Mon May 17 11:09:43 MDT 2010 0 In other words, the return value of the date command in an END subroutine overrides my desired exit value. How do I fix this? I want to tell Perl: if I explicitl

system() call in END() subroutine overrides script exit value

2010-05-17 Thread Kelly Jones
I did this in tcsh: > perl -le 'exit(2); sub END {system("date");}' ; echo $status Mon May 17 11:09:43 MDT 2010 0 In other words, the return value of the date command in an END subroutine overrides my desired exit value. How do I fix this? I want to tell Perl: if I explicitly do exit($foo), I wa

Re: Perl fork() system call

2009-02-21 Thread Jenda Krynicky
From: "Chas. Owens" > On Wed, Feb 18, 2009 at 12:14, Chuck wrote: > > Hello, > > > > We have a GUI where, if a button is clicked, Putty (the remote access > > program) is launched using > > > > System("C:\\Progra~1\\Putty\\putty.exe"); > > > > is launched. However, when this is executed, the orig

Re: Perl fork() system call

2009-02-19 Thread Raymond Wan
Hi Chuck, Chuck wrote: We have a GUI where, if a button is clicked, Putty (the remote access program) is launched using System("C:\\Progra~1\\Putty\\putty.exe"); is launched. However, when this is executed, the original GUI freezes, and we cannot use it unless we close Putty. We tried using

Re: Perl fork() system call

2009-02-19 Thread Chuck
thanks for the help, everyone. We found a way that works...we used Win32::Process::Create. On Feb 18, 7:02 pm, chas.ow...@gmail.com (Chas. Owens) wrote: > On Wed, Feb 18, 2009 at 12:14, Chuck wrote: > > Hello, > > > We have a GUI where, if a button is clicked, Putty (the remote access > > program

Re: Perl fork() system call

2009-02-19 Thread kevin liu
Hi Chuck: I don't think exec will do the right thing. According to perldoc.perl.org, exec will stop the current process to execute another one while system will do a fork() first, so system will be your right choice I think. This is a short example I did recently: **

Re: Perl fork() system call

2009-02-18 Thread Chas. Owens
On Wed, Feb 18, 2009 at 12:14, Chuck wrote: > Hello, > > We have a GUI where, if a button is clicked, Putty (the remote access > program) is launched using > > System("C:\\Progra~1\\Putty\\putty.exe"); > > is launched. However, when this is executed, the original GUI freezes, > and we cannot use i

Perl fork() system call

2009-02-18 Thread Chuck
Hello, We have a GUI where, if a button is clicked, Putty (the remote access program) is launched using System("C:\\Progra~1\\Putty\\putty.exe"); is launched. However, when this is executed, the original GUI freezes, and we cannot use it unless we close Putty. We tried using the fork() command l

Re: System Call Help

2008-07-25 Thread masterpoet
On Jul 24, 7:39 pm, [EMAIL PROTECTED] (Peng Kyo) wrote: > On Fri, Jul 25, 2008 at 3:22 AM, <[EMAIL PROTECTED]> wrote: > > Greets Guys > > > Trying to Make a system from perl to use the sort. > > > # @args = ('c:\windows\system32\sort.exe "C\logs\"'); > > # system(@args) == 0 > > # or

Re: System Call Help

2008-07-24 Thread peng . kyo
On Fri, Jul 25, 2008 at 3:22 AM, <[EMAIL PROTECTED]> wrote: > Greets Guys > > > Trying to Make a system from perl to use the sort. > > > > # @args = ('c:\windows\system32\sort.exe "C\logs\"'); > # system(@args) == 0 > # or die "system @args failed:$?" > rather than calling an externa

System Call Help

2008-07-24 Thread masterpoet
Greets Guys Trying to Make a system from perl to use the sort. # @args = ('c:\windows\system32\sort.exe "C\logs\"'); # system(@args) == 0 # or die "system @args failed:$?" Trying to basically grab two log files. sort them so that we don't lose any data and then output to a mas

Re: How can I assign system() call to a Variable

2007-11-15 Thread Jeff Pang
On Nov 14, 2007 11:11 AM, Marco <[EMAIL PROTECTED]> wrote: > > $inact = "cat /proc/meminfo | grep -w Inactive | sed 's/^.*Inactive: // > g' | sed 's/kB//'"; > $result = system(cat /proc/meminfo | grep -w Inactive | sed 's/ > ^.*Inactive: //g' | sed 's/kB//'); > print $result; > > btw, here you re

Re: How can I assign system() call to a Variable

2007-11-15 Thread Jeff Pang
On Nov 15, 2007 3:05 PM, Marco <[EMAIL PROTECTED]> wrote: > > > By the way, how can I use this script to get the data I need form > remote machine?...thanks > > use Net::SSH or something like that. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ht

Re: How can I assign system() call to a Variable

2007-11-15 Thread Marco
By the way, how can I use this script to get the data I need form remote machine?...thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: How can I assign system() call to a Variable

2007-11-14 Thread Marco
Hi.. Thanks for all you guys help & Suggestion. Actually I truned around to use the other way to get the data I need since system() give me such a hard time... :( my $inactive = "cat /proc/meminfo | grep -w Inactive | sed 's/ ^.*Inactive://g' | sed 's/kB//'"; open(DATA, "$inactive|") || die "Ca

Re: How can I assign system() call to a Variable

2007-11-14 Thread Marco
Hi... Relly appreciate all of you guys' help. You guys did provide me valuable information. I will give it a try all you guys suggestion. Actually I gave up the system() call last night since it gave me such a hard time. The other way I did is shown below to get the data I need,...

Re: How can I assign system() call to a Variable

2007-11-14 Thread yaron
:21 AM (GMT+0200) Asia/Jerusalem Subject: Re: How can I assign system() call to a Variable On Nov 14, 2007 5:18 PM, Beginner <[EMAIL PROTECTED]> wrote: > On 13 Nov 2007 at 19:11, Marco wrote: > > my $result = system($inact); > print $result; > my $result = `system commands`; print

Re: How can I assign system() call to a Variable

2007-11-14 Thread Ron Bergin
On Nov 13, 7:11 pm, [EMAIL PROTECTED] (Marco) wrote: > Hi... > > Can someone help me on this? Actually I can get the dara from the > system()...But it shows "0" when I print the $result...How can I > assign the system() to $result ?Thanks... > > here below is the code... > > $inact = "cat /proc

Re: How can I assign system() call to a Variable

2007-11-14 Thread Ron Bergin
On Nov 13, 7:11 pm, [EMAIL PROTECTED] (Marco) wrote: > Hi... > > Can someone help me on this? Actually I can get the dara from the > system()...But it shows "0" when I print the $result...How can I > assign the system() to $result ?Thanks... > > here below is the code... > > $inact = "cat /proc

Re: How can I assign system() call to a Variable

2007-11-14 Thread Jeff Pang
On Nov 14, 2007 5:18 PM, Beginner <[EMAIL PROTECTED]> wrote: > On 13 Nov 2007 at 19:11, Marco wrote: > > my $result = system($inact); > print $result; > my $result = `system commands`; print $result; system() returns nothing but the executed status of the command itself. -- To unsubscribe, e-

Re: How can I assign system() call to a Variable

2007-11-14 Thread Beginner
On 13 Nov 2007 at 19:11, Marco wrote: > Hi... Hi > Can someone help me on this? Actually I can get the dara from the > system()...But it shows "0" when I print the $result...How can I > assign the system() to $result ?Thanks... > > here below is the code... > > $inact = "cat /proc/meminfo

How can I assign system() call to a Variable

2007-11-14 Thread Marco
Hi... Can someone help me on this? Actually I can get the dara from the system()...But it shows "0" when I print the $result...How can I assign the system() to $result ?Thanks... here below is the code... $inact = "cat /proc/meminfo | grep -w Inactive | sed 's/^.*Inactive: // g' | sed 's/kB

Re: System call returning Bad file Descriptor

2007-08-14 Thread Chas Owens
On 8/14/07, Darnelle Roby <[EMAIL PROTECTED]> wrote: snip > Once we call the script using an Oracle forms Host call the script returns an > error in the log file of "Bad file descriptor". snip > if (system("ghostscript -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite snip It sounds like ghostscript is getti

System call returning Bad file Descriptor

2007-08-14 Thread Darnelle Roby
Currently running the following code within a script on an Linux based Oracle Apps Server. When script ran directly from linux it runs successfully. Once we call the script using an Oracle forms Host call the script returns an error in the log file of "Bad file descriptor". I have confirmed

Re: System call

2007-04-10 Thread Tom Phoenix
On 4/10/07, Nath, Alok (STSD) <[EMAIL PROTECTED]> wrote: Can somebody explain the difference between this 2 system calls ? system "grep 'fred flint' buff" This one asks the shell (/bin/sh) to run the command "grep 'fred flint' buff". system "grep", "fred flint", "buff" This one asks

System call

2007-04-10 Thread Nath, Alok (STSD)
Hi, Can somebody explain the difference between this 2 system calls ? system "grep 'fred flint' buff" system "grep", "fred flint", "buff" Thanks Alok -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Question about system call

2007-03-13 Thread Chas Owens
On 3/13/07, Paul <[EMAIL PROTECTED]> wrote: On Tue, March 13, 2007 2:38 am, yitzle wrote: > Where you doing "rm -f $file" or `rm -f $file`? > You need to use "backticks" for system commands. If memory serves me, back ticks are only needed inside a system command for UNIX commands and regular tic

Re: Question about system call

2007-03-13 Thread Paul
On Tue, March 13, 2007 2:38 am, yitzle wrote: > Where you doing "rm -f $file" or `rm -f $file`? > You need to use "backticks" for system commands. If memory serves me, back ticks are only needed inside a system command for UNIX commands and regular ticks specifying the system command within the Pe

Re: Question about system call

2007-03-13 Thread Ken Foskey
On Tue, 2007-03-13 at 02:29 -0400, Mathew wrote: > I recently forgot about the unlink function and had been trying to > remove files using the less efficient system call to run "rm -f > /path/to/files". I found, however, that this didn't work at all. > > I'v

Re: Question about system call

2007-03-13 Thread Madan Kumar Nath
to remove files using the less efficient system call to run "rm -f /path/to/files". I found, however, that this didn't work at all. I've since replaced it with unlink and get the results one can expect to get so it isn't a matter of trying to find a way to get the former to wor

Re: Question about system call

2007-03-12 Thread yitzle
Where you doing "rm -f $file" or `rm -f $file`? You need to use "backticks" for system commands. On 3/13/07, Mathew <[EMAIL PROTECTED]> wrote: I recently forgot about the unlink function and had been trying to remove files using the less efficient system call to run

Re: Question about system call

2007-03-12 Thread Jeff Pang
> >I recently forgot about the unlink function and had been trying to >remove files using the less efficient system call to run "rm -f >/path/to/files". I found, however, that this didn't work at all. > >I've since replaced it with unlink and get the result

Question about system call

2007-03-12 Thread Mathew
I recently forgot about the unlink function and had been trying to remove files using the less efficient system call to run "rm -f /path/to/files". I found, however, that this didn't work at all. I've since replaced it with unlink and get the results one can expect to get so

Re: system call issues

2006-09-21 Thread John W. Krahn
Saurabh Singhvi wrote: > Hi all, Hello, > The following code block > > foreach $protein (@pdbs) { >$rmsd[$i] = 0; >foreach $protein2 (@pdbs2) { >system("./TMalign $protein $protein2 | cgrep -i rmsd > What is cgrep? I don't have that on my system. > temp") == 0

Re: system call issues

2006-09-21 Thread Saurabh Singhvi
Hi, I am sorry about the above, it was a part of the complete code. I was using warnings but not strict. Also, the OS is gentoo and fs was reiser4/ ext3, with same results. Your method kind of works, but a lot of warnings are being thrown up. The main ones being : Use of uninitialized value in

Re: system call issues

2006-09-21 Thread Mumia W.
On 09/21/06 07:30, Mumia W. wrote: Try the open command I wrote, and see if that works. I hope this helps. s/open command/code/ No I didn't write the open command ;-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <

Re: system call issues

2006-09-21 Thread Mumia W.
On 09/21/2006 04:52 AM, Saurabh Singhvi wrote: Hi all, The following code block is written without strictures and warnings enabled. If you place these lines, use strict; use warnings; at the top of your program, you'll catch errors much more quickly. In particular, "use strict" will fo

system call issues

2006-09-21 Thread Saurabh Singhvi
Hi all, The following code block foreach $protein (@pdbs) { $rmsd[$i] = 0; foreach $protein2 (@pdbs2) { system("./TMalign $protein $protein2 | cgrep -i rmsd > temp") == 0 or die $?; open(TEMP,'temp') or die $?; chomp($line = );

Re: Howto include string in system call

2006-05-20 Thread JupiterHost.Net
ehave how you want... I was wondering is it because Acme::Spork doesn't allow system call for perl interpreter. How did you do the echo that did work then? Or is it the way I construct the called perl script is wrong. Probably that, or there is some other problem with it rely

Re: Howto include string in system call - Answering (a) suggestion

2006-05-19 Thread Wijaya Edward
Dear Jupiter, > a) does it "do the job" by itself: > > #!/usr/bin/perl > > use strict; > use warnings; > > my $ue = 'whatever'; > my $con_type = 'whatever'; > my $nb_un= 'whatever'; > print "Running: perl compute_price.pl -email $ue -type $con_type - > unit > $nb_un\n"; > system "pe

Re: Howto include string in system call

2006-05-19 Thread Wijaya Edward
code. Echoing witin the system _works_. But running perl script within system _doesn't work_. I was wondering is it because Acme::Spork doesn't allow system call for perl interpreter. Or is it the way I construct the called perl script is wrong. The 'compute_price.pl' sc

Re: Howto include string in system call

2006-05-19 Thread JupiterHost.Net
Wijaya Edward wrote: Dear Jupiter, Thanks so much for the reply. However... >you are not passing the variabels to it proeprly. (an oi, why is that written so incredibly hard to read ???) sorry about that. So you see it has nothgin to do with using system it has to so with calling

Re: Howto include string in system call

2006-05-19 Thread Wijaya Edward
Dear Jupiter, Thanks so much for the reply. However... >you are not passing the variabels to > it > proeprly. > (an oi, why is that written so incredibly hard to read ???) > sorry about that. > So you see it has nothgin to do with using system it has to so > with > calling a funtion as i

Re: Howto include string in system call

2006-05-19 Thread JupiterHost.Net
Saboo, Nandakishore wrote: Hi Edward, __BEGIN__ use Acme::Spork; my $req_id = spork( sub { system("perl compute_price.pl -eml \"$uemail\" -type $ct -unit $nu"); } ) or die qq {Could not fork for spork: $!}; __END__ Any idea? What's this Acme::Spork package about(i have no idea) a

Re: Howto include string in system call

2006-05-19 Thread JupiterHost.Net
And my actuall system call is this:: Ah that is what you failed to mention :) __BEGIN__ use Acme::Spork; my $req_id = spork( sub { system("perl compute_price.pl -eml \"$uemail\" -type $ct -unit $nu"); } ) or die qq {Could not fork for spork: $!}; __END__ Any ide

Re: Howto include string in system call

2006-05-19 Thread JupiterHost.Net
Wijaya Edward wrote: Hi all, How do you pass a string inside an under system call. Just like you're doing below, unless I'm misunderstanding the question I tried to pass a string like this under EMAIL option: system("perl mycode.pl -email 'test_string

Re: Howto include string in system call

2006-05-19 Thread Dr.Ruud
Wijaya Edward schreef: > I tried [...] > > system( "perl mycode.pl -email 'test_string' > -type $sometype > -unit $some_unit" ) ; > > But while debugging for mycode.pl I can't see the value for > [-email], while I can see the value for [-typ

RE: RE: Howto include string in system call

2006-05-19 Thread Saboo, Nandakishore
Hi Edward, >__BEGIN__ > use Acme::Spork; > my $req_id = spork( sub { system("perl compute_price.pl -eml \"$uemail\" > -type $ct -unit $nu"); } ) >or die qq {Could not fork for spork: $!}; > >__END__ >Any idea? What's this Acme::Spork package about(i have no idea) and it is not installed on m

Re: RE: Howto include string in system call

2006-05-19 Thread Wijaya Edward
"unit=i"=>\$no_unit, "email=s"=>\$tg_email, "help"=>\$help,); if ($res) { print "$tg_email\n" # show nothing here. # and do some other thing } __END__ And my actuall system call is

RE: Howto include string in system call

2006-05-19 Thread Saboo, Nandakishore
>Wijaya Edward wrote on [Friday, May 19, 2006 3:56 PM] Hi Edward, >Hi all, >How do you pass a string inside an under system call. >I tried to pass a string like this under EMAIL option: >system("perl mycode.pl -email 'test_string' -type $sometype -unit >

Howto include string in system call

2006-05-19 Thread Wijaya Edward
Hi all, How do you pass a string inside an under system call. I tried to pass a string like this under EMAIL option: system("perl mycode.pl -email 'test_string' -type $sometype -unit $some_unit"); or system("perl mycode.pl -email $receipt_email -type $sometype -

using an system call for decryption

2005-12-29 Thread DBSMITH
All, I am using gpg ( opensource encryption/decryption tool) to send files via ftp to a remote site. In my WIN32 Perl program I am trying to figure how I would do this equivalent in Unix... #> cat gpgpass |gpg - - "all the options" newfile encryptedfile The gpgpass is the password that will enabl

Re: System call for openssl

2005-11-10 Thread Pete Emerson
If you don't specify -out the openssl command (I think, untested) will spit the results to STDOUT, in which case you could do this: $results = `openssl smime smime -sign -outform der -nodetach -signer $certificate -in $encoded`; and then you probably want to chomp $results, or parse them in

System call for openssl

2005-11-10 Thread Ward.P.Fontenot
If I have: $certificate = "/home/oracle/certs/oracle.pem"; $encoded = encode_base64($sha1data); Can I do something like this: system('openssl smime smime -sign -outform der -nodetach -out $signed -signer $certificate -in $encoded'); To get a value for $signed? Paul Fontenot WFS - CAST Operation

Problem making system call on Win98.. help!

2005-07-26 Thread robert johnson
this is driving me crazy. i worked on it for hours and cant figure it out. i have an execuatable program, written in C, that prints its result as a string to the terminal. and this program definitely works correctly on WinXP or Win98. it prints the result to the screen. big deal, right? when

Re: background system call

2005-06-02 Thread sparciii
On 6/2/05, Tielman Koekemoer (TNE) <[EMAIL PROTECTED]> wrote: > > > Hey, > Hi > > > > > Within a perl script of mine, I'd like to execute a shell > > command but have it sleep for a few minutes prior to doing > > so. There are probably better ways but I can't think/find any > > at the moment to d

RE: background system call

2005-06-01 Thread Tielman Koekemoer \(TNE\)
> Hey, Hi > > Within a perl script of mine, I'd like to execute a shell > command but have it sleep for a few minutes prior to doing > so. There are probably better ways but I can't think/find any > at the moment to do so, what I tried so far is shown here: > > system("sleep

Re: background system call

2005-06-01 Thread John W. Krahn
andysayshi wrote: Hey, Hello, Within a perl script of mine, I'd like to execute a shell command but have it sleep for a few minutes prior to doing so. There are probably better ways but I can't think/find any at the moment to do so, what I tried so far is shown here: system("

background system call

2005-06-01 Thread andysayshi
Hey, Within a perl script of mine, I'd like to execute a shell command but have it sleep for a few minutes prior to doing so. There are probably better ways but I can't think/find any at the moment to do so, what I tried so far is shown here: system("sleep 90 ; some_command_here")

select system call

2005-05-16 Thread Gayatri
Dear Friends, I am facing one problem please let me know if anybody knows the solution. The problem is as follows use IO::Select; use IO::Socket; The variable $sock will be handling my socket id for TCP, AF_INET/PF_INET family and the code is as shown bellow

Re: output from system call

2005-03-08 Thread geraldine_1
Thanks everyone for the input. Getting the date output is much easier in perl than I originally thought. thanks! Geraldine > On Tue, 8 Mar 2005, Ankur Gupta wrote: > > > [EMAIL PROTECTED] wrote: > > > > > Hi, > > > Is there a way to store

Re: output from system call

2005-03-08 Thread Chris Devers
On Tue, 8 Mar 2005, Ankur Gupta wrote: > [EMAIL PROTECTED] wrote: > > > Hi, > > Is there a way to store the output of a system call on unix? > > > > eg. system("date"); > > > use backticks... > > $date = `date`; This is, of course, exac

Re: output from system call

2005-03-08 Thread Wiggins d'Anconia
[EMAIL PROTECTED] wrote: Hi, Is there a way to store the output of a system call on unix? eg. system("date"); I like to store the date output to a variable. The only way I know of is to open and write the output to a file and then read in to a variable. Is there a simpler way? Thanks

RE: output from system call

2005-03-08 Thread Manav Mathur
chomp($date=`date`) ; ##exploiting what Perl offers but C doesnt -Original Message- From: Ankur Gupta [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 08, 2005 10:03 PM To: [EMAIL PROTECTED] Cc: beginners@perl.org Subject: Re: output from system call [EMAIL PROTECTED] wrote: >Hi,

Re: output from system call

2005-03-08 Thread mgoland
- Original Message - From: [EMAIL PROTECTED] Date: Tuesday, March 8, 2005 11:29 am Subject: output from system call > Hi, Hello, > Is there a way to store the output of a system call on unix? > sure > eg. system("date"); my $Date = system("date"); >

Re: output from system call

2005-03-08 Thread Ankur Gupta
[EMAIL PROTECTED] wrote: Hi, Is there a way to store the output of a system call on unix? eg. system("date"); use backticks... $date = `date`; Don't forget to chomp the $date variable as I guess you just want the date, not the newline character with it... chomp($date); -- To unsu

output from system call

2005-03-08 Thread geraldine_1
Hi, Is there a way to store the output of a system call on unix? eg. system("date"); I like to store the date output to a variable. The only way I know of is to open and write the output to a file and then read in to a variable. Is there a simpler way? Thanks in advance. Geraldi

Re: Passing options to command in a system call

2004-10-01 Thread Jan Eden
Thanks, Errin, Doug and Bob, Errin Larsen wrote on 01.10.2004: >On Fri, 1 Oct 2004 17:41:50 +0200, Jan Eden <[EMAIL PROTECTED]> >wrote: >>How can I pass an option to system's first argument in a setting >>like this? > >This is ironic: > >>If all else fails read the instructions. - Donald Knuth

Re: Passing options to command in a system call

2004-10-01 Thread Errin Larsen
On Fri, 1 Oct 2004 17:41:50 +0200, Jan Eden <[EMAIL PROTECTED]> wrote: > Hi, Hello! <> > > How can I pass an option to system's first argument in a setting like this? > > (I know I can use a module instead of calling wget, but this is a more general > issue.) > > Thanks, > > Jan > -- Th

Re: Passing options to command in a system call

2004-10-01 Thread Doug Lewis
I haven't used the wget program before, but try adding a comma after your -O. I did that and I got it working. Jan Eden <[EMAIL PROTECTED]> wrote:Hi, I try to call wget using system like this: system("wget -O /dev/null", "http://janeden.org/test/file.txt";); This does not work: Can't exec "w

RE: Passing options to command in a system call

2004-10-01 Thread Bob Showalter
Jan Eden wrote: > Hi, > > I try to call wget using system like this: > > system("wget -O /dev/null", "http://janeden.org/test/file.txt";); > > This does not work: > > Can't exec "wget -O /dev/null": No such file or directory at > ./wgetrec.pl line 6. > > Ok, so how about this: > > system("wg

Passing options to command in a system call

2004-10-01 Thread Jan Eden
Hi, I try to call wget using system like this: system("wget -O /dev/null", "http://janeden.org/test/file.txt";); This does not work: Can't exec "wget -O /dev/null": No such file or directory at ./wgetrec.pl line 6. Ok, so how about this: system("wget", "-O /dev/null http://janeden.org/test/fi

Re: system call

2004-08-27 Thread Wiggins d Anconia
don't translate to "fact" ... just ask Microsoft. http://danconia.org > > > "Wiggins d Anconia" <[EMAIL PROTECTED]> > 08/27/2004 05:18 PM > > > To: [EMAIL PROTECTED], "Wiggins d Anconia" <[EMAIL PROTECTED]>, > [EMAIL PRO

Re: system call

2004-08-27 Thread DBSMITH
ia" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] cc: Subject:Re: system call Please bottom post > > yes I do understand but it is not working. You need to tell us that originally, we are not mind readers. In other words when cat > /tmp/foo fails the

Re: system call

2004-08-27 Thread Wiggins d Anconia
mean, if anything. http://danconia.org > > thank you , > Derek B. Smith > OhioHealth IT > UNIX / TSM / EDM Teams > > > > > > > "Wiggins d Anconia" <[EMAIL PROTECTED]> > 08/27/2004 04:12 PM > > > To: [EMAIL PR

Re: system call

2004-08-27 Thread DBSMITH
es say the return code is two 8 bit values in one 16 bit number. thank you , Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams "Wiggins d Anconia" <[EMAIL PROTECTED]> 08/27/2004 04:12 PM To: [EMAIL PROTECTED], [EMAIL PROTECTED] cc: Subject:

Re: system call

2004-08-27 Thread Wiggins d Anconia
> > All, > > I want to capture the exit value of a system call. How can I do this? > My code is: > > system ( " cat /tmp/foo" ); > if ( $? == 0 ) { > > blah blah blah > } > > > I read the cookbook

system call

2004-08-27 Thread DBSMITH
All, I want to capture the exit value of a system call. How can I do this? My code is: system ( " cat /tmp/foo" ); if ( $? == 0 ) { blah blah blah } I read the cookbook and it says : Both wait and waitpid return the process ID that they just

Re: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: > You see, with cgi scripting if you attempt to write to the browser without > first printing > "Content-type: text/html\n\n" > > You will get an error, and I thing this is what you are seeing. Actually, at least on my installation, IIS will return error messages to the b

Re: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread R. Joseph Newton
Dan Muey wrote: > > $exit_value = $? >> 8; bit 8 [0 bit on high byte] > > $signal_num = $? & 127; value of 7 lowest bits > > $dumped_core = $? & 128;bit 7 [highest bit of low byte] > Just curious, what is happening here with the >> and the &. > I see there's a 128 ther

  1   2   >