Sponsored Content
Top Forums Shell Programming and Scripting How to call expect script from Perl Post 302392480 by pludi on Thursday 4th of February 2010 01:42:09 PM
Old 02-04-2010
If you see a text file being generated, I'd say that's a pretty good indicator that your system() line is working. Now try using the absolute path for the text file when reading it.

Also, it would be good style to also include
Code:
use strict;
use warnings;

in your code and check for any errors.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how can call perl script as command?

Hello say i have written some perl scripts , now i like to call them in my unix shell as unix command like "more" , "ls" , "grep" so that my say perl script called "foo.pl" will be called from every where as "foo" or "foo arg1 arg2"? Thanks (1 Reply)
Discussion started by: umen
1 Replies

2. Shell Programming and Scripting

how to call a perl script from tcsh?

Hi I am not sure how to call a perl script from a tcsh shell. do i need to set any environment variables? your help is appreciated Thanks (1 Reply)
Discussion started by: megastar
1 Replies

3. UNIX for Advanced & Expert Users

Wget call in a Perl script

I've got to do a wget call in a Perl Script. I am basically doing migration of a shell script which was previously doing it. The code in the sh file was as follows. wget -nv -o /tmp/wget.run.log -t 5 -w 10 http://windows-server/myapp/1try.asp?myparam=no This wget command is executing an... (1 Reply)
Discussion started by: rahulrathod
1 Replies

4. Shell Programming and Scripting

Calling Expect script in Perl...

I call a EXPECT script from my perl script with machine IP and a FIle. The script logins to the machine and exports the value. The values to be exported or stored in a file. I have close to 10 machines and I have created 10 files and pass the corresponding files in command line, Now I could like... (4 Replies)
Discussion started by: ramkriz
4 Replies

5. Shell Programming and Scripting

call shell script from perl cgi script problem

hi,, i have perl scipt with line : system('./try.sh $t $d $m'); in shell scipt try.sh i have the line: echo $1 its not printing value of $t that i hav passed..y is it so..i am running it from apache web server (2 Replies)
Discussion started by: raksha.s
2 Replies

6. Shell Programming and Scripting

how to call a bash script using perl

Hi I m new to perl. I m trying to write a perl script that calls a bash script; does anyone have a script already that they can provide or help me out? Thanks a lot. (2 Replies)
Discussion started by: adnan786
2 Replies

7. Shell Programming and Scripting

on HTML form, Call Expect in Perl problem

Hi I have a successfullly run perl script (by issuing command "perl sub.pl" under shell mode) and this sub.pl will call sub.exp successfully. The sub.exp expect script is basically to login to a server and run some commands and put the output into a sub.txt file, it takes about 5 seconds to... (0 Replies)
Discussion started by: cxbest
0 Replies

8. Shell Programming and Scripting

Call .profile in perl script

Hello Gurus Can anyone please let me know how to call .profle file in perl script When I am calling the .profile file its giving error Shall I create unix script which has .profile command and call perl script internally (2 Replies)
Discussion started by: Pratik4891
2 Replies

9. Shell Programming and Scripting

Call a Perl script within a bash script and store the ouput in a .txt file

I'm attempting to write a bash script that will create a network between virtual machines. It accepts three arguments: an RSpec that describes the network topology, and two list of machines (servers and clients). I have a (working) Perl script that I want to call. This Perl script takes an RSpec... (6 Replies)
Discussion started by: mecaka
6 Replies

10. UNIX for Advanced & Expert Users

Calling expect from shell script which inturn call python

Hi Team, I have to execute a task from my local machine, where i keep my .expect,.sh, .bash and .python scripts .Task are coded in the script and has to be executed at remote machine. for that i used following task ..... SCRIPT 1: cat shell_check.sh read value if then expect... (3 Replies)
Discussion started by: Sivarajan N
3 Replies
Differentiate(3pm)					User Contributed Perl Documentation					Differentiate(3pm)

NAME
Math::Calculus::Differentiate - Algebraic Differentiation Engine SYNOPSIS
use Math::Calculus::Differentiate; # Create an object. my $exp = Math::Calculus::Differentiate->new; # Set a variable and expression. $exp->addVariable('x'); $exp->setExpression('x^2 + 5*x') or die $exp->getError; # Differentiate and simplify. $exp->differentiate or die $exp->getError;; $exp->simplify or die $exp->getError;; # Print the result. print $exp->getExpression; # Prints 2*x + 5 DESCRIPTION
This module can take an algebraic expression, parse it into a tree structure, modify the tree to give a representation of the differentiated function, simplify the tree and turn the tree back into an output of the same form as the input. It supports differentiation of expressions including the +, -, *, / and ^ (raise to power) operators, bracketed expressions to enable correct precedence and the functions ln, exp, sin, cos, tan, sec, cosec, cot, sinh, cosh, tanh, sech, cosech, coth, asin, acos, atan, asinh, acosh and atanh. EXPORT
None by default. METHODS
new $exp = Math::Calculus::Differentiate->new; Creates a new instance of the differentiation engine, which can hold an individual expression. addVariable $exp->addVariable('x'); Sets a certain named value in the expression as being a variable. A named value must be an alphabetic chracter. setExpression $exp->setExpression('x^2 + 5*x); Takes an expression in human-readable form and stores it internally as a tree structure, checking it is a valid expression that the module can understand in the process. Note that the engine is strict about syntax. For example, note above that you must write 5*x and not just 5x. Whitespace is allowed in the expression, but does not have any effect on precedence. If you require control of precedence, use brackets; bracketed expressions will always be evaluated first, as you would normally expect. The module follows the BODMAS precedence convention. Returns undef on failure and a true value on success. getExpression $expr = $exp->getExpression; Returns a textaul, human readable representation of the expression that is being stored. differentiate $exp->differentiate('x'); Differentiates the expression that was stored with setExpression with respect to the variable passed as a parameter. Returns undef on failure and a true value on success. simplify $exp->simplify; Attempts to simplify the expression that is stored internally. It is a very good idea to call this after calling differentiate, as the tree will often not be in the most compact possible form, and this will affect the readability of output from getExpression and the performance of future calls to differentiate if you are intending to obtain higher derivatives. Returns undef on failure and a true value on success. getTraceback $exp->getTraceback; When setExpression and differentiate are called, a traceback is generated to describe what these functions did. If an error occurs, this traceback can be extremely useful in helping track down the source of the error. getError $exp->getError; When any method other than getTraceback is called, the error message stored is cleared, and then any errors that occur during the execution of the method are stored. If failure occurs, call this method to get a textual representation of the error. SEE ALSO
The author of this module has a website at <http://www.jwcs.net/~jonathan/>, which has the latest news about the module and a web-based frontend to allow you to test the module out for yourself. AUTHOR
Jonathan Worthington, <jonathan@jwcs.net> COPYRIGHT AND LICENSE
Copyright (C) 2004 by Jonathan Worthington This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available. POD ERRORS
Hey! The above document had some coding errors, which are explained below: Around line 55: '=item' outside of any '=over' Around line 150: You forgot a '=back' before '=head1' perl v5.10.0 2004-12-18 Differentiate(3pm)
All times are GMT -4. The time now is 03:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy