PERL: In a perl-scripttTrying to execute another perl-script that SETS SOME VARIABLES !


 
Thread Tools Search this Thread
Top Forums Programming PERL: In a perl-scripttTrying to execute another perl-script that SETS SOME VARIABLES !
# 1  
Old 03-03-2018
The solution to my question is the command
do EXPR;
, having as EXPR the script-2!

That way the script-2 will have defined in script-1 some variables;
it will process everything, printing on STDOUT what it should print (the script-2), and
it will set any variable that will be available in the script-1 after completing the script-2.

After finishing the script-2 control coming back to script-1

That is all I been looking for!

(Hmm, after review my question, surprizingly realizing that I have used the 'do ..'
How it happening that I have mislead myself to have it not enough, I am not sure!
--- My apologizes for all that mess!!!! )
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Perl script with lock to execute only once in a day

Hi, I am new to perl and have a script to which i want to ensure that no matter how many ever times i execute the script it should execute only once per day. Cronjob is not a safe method as I want to built in capability inside the script. (1 Reply)
Discussion started by: ctrld
1 Replies

2. Shell Programming and Scripting

[perl] execute remotely script

Hello Can some help with write part of perl script I need something like this in perl SSH="/bin/ssh -o BatchMode=yes -o" USER="test" SRV="server" SCRIPT_TO_EXEC="/tmp/test.sh" -> shell script OUT=/tmp/out.file ${SSH} -l ${USER} ${SRV} 'sudo /usr/bin/ksh -s' < ${SCRIPT_TO_EXEC} >> ${OUT}... (1 Reply)
Discussion started by: vikus
1 Replies

3. Shell Programming and Scripting

Excuting perl script from within a perl script with variables.

Not sure what I am doing wrong here, but I can print the list with no issue. Just a blank screen with the 'do'. #!/usr/bin/perl open FILE, "upslist.txt"; while ($line=<FILE>){ if ($line=~/^(.*?),(.*?)$/){ #print "ups:$1 string:$2\n"; do 'check_snmp_mgeups-0.1.pl -H $1 -C $2'; } ... (1 Reply)
Discussion started by: mrlayance
1 Replies

4. Shell Programming and Scripting

Execute immediate in perl script

hi All, i have to modify a shell script written in Perl. i have to use execute immediate within this. i have to create a temporary table but it should have name like ar_data_$mmyyyy , how can i achieve this? any help on this would be highly appriciated. (6 Replies)
Discussion started by: lovelysethii
6 Replies

5. Shell Programming and Scripting

HELP on Perl array / sorting - trying to convert Korn Shell Script to Perl

Hi all, Not sure if this should be in the programming forum, but I believe it will get more response under the Shell Programming and Scripting FORUM. Am trying to write a customized df script in Perl and need some help with regards to using arrays and file handlers. At the moment am... (3 Replies)
Discussion started by: newbie_01
3 Replies

6. Shell Programming and Scripting

Perl Script to execute todays date.

Hi Folks, I have created a script last month to retrive files thru FTP and cronjob was running fine till yesterday. But the naming convention of the daily file is Filename_<date>.xml where date is YYYYMMDD. But today i have received file name as Filename_20110232.xml :( Part of my Perl... (4 Replies)
Discussion started by: Sendhil.Kumaran
4 Replies

7. Shell Programming and Scripting

Perl :How to print the o/p of a Perl script on console and redirecting same in log file @ same time.

How can i print the output of a perl script on a unix console and redirect the same in a log file under same directory simultaneously ? Like in Shell script, we use tee, is there anything in Perl or any other option ? (2 Replies)
Discussion started by: butterfly20
2 Replies

8. Shell Programming and Scripting

perl/unix: script in command line works but not in perl

so in unix this command works works and shows me a list of directories find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt but when i try running a perl script to run this command my $query = 'find . -name \*.xls -exec dirname {} \; | sort -u | > list.txt';... (2 Replies)
Discussion started by: kpddong
2 Replies

9. Shell Programming and Scripting

[Perl] Accessing array elements within a sed command in Perl script

I am trying to use a script to replace the header of each file, whose filename are stored within the array $test, using the sed command within a Perl script as follows: $count = 0; while ( $count < $#test ) { `sed -e 's/BIOGRF 321/BIOGRF 332/g' ${test} > 0`; `cat 0 >... (2 Replies)
Discussion started by: userix
2 Replies

10. UNIX for Dummies Questions & Answers

a cron job needs a perl script to execute

Hello evreyone, this is my first post, and to say i'm new to this is an understatement. I know very little about perl scripts and hope some one can help me. i'm looking to get a script that a cron job can execute. what the script needs to to is 1) connect to a mysql database 2) go to a... (2 Replies)
Discussion started by: Exader
2 Replies
Login or Register to Ask a Question
PERLEPOC(1)						 Perl Programmers Reference Guide					       PERLEPOC(1)

NAME
perlepoc - Perl for EPOC SYNOPSIS
Perl 5 README file for the EPOC Release 5 operating system. INTRODUCTION
EPOC is an OS for palmtops and mobile phones. For more information look at: <http://www.symbian.com/> This is a port of perl to the epocemx SDK by Eberhard Mattes, which itself uses the SDK by symbian. Essentially epocemx it is a POSIX look alike environment for the EPOC OS. For more information look at: <http://epocemx.sourceforge.net/> perl and epocemx runs on Epoc Release 5 machines: Psion 5mx, 5mx Pro, Psion Revo, Psion Netbook and on the Ericsson M128. It may run on Epoc Release 3 Hardware (Series 5 classic), too. For more information about this hardware please refer to <http://www.psion.com/> Vendors which like to have support for their devices are free to send me a sample. INSTALLING PERL ON EPOC
You can download a ready-to-install version from <http://www.oflebbe.de/perl/perl5.html> You will need at least ~6MB free space in order to install and run perl. Please install the emxusr.sis package from <http://epocemx.sourceforge.net/> first. Install perl.sis on the EPOC machine. If you do not know how to do that, consult your PsiWin documentation. Perl itself and its standard library is using 4 MB disk space. Unicode support and some other modules are left out. (For details, please look into epoc/createpkg.pl). If you like to use these modules, you are free to copy them from a current perl release. STARTING PERL ON EPOC
Please use the epocemx shell to start perl. perl integrates with the conventions of epocemx. Features of Perl on Epoc The built-in function EPOC::getcwd returns the current directory. Restrictions of Perl on Epoc Features are left out, because of restrictions of the POSIX support in EPOC: o socket IO is only implemented poorly. You can only use sysread and syswrite on them. The commands read, write, print, <> do not work for sockets. This may change iff epocemx supports sockets. o kill, alarm and signals. Do not try to use them. This may be impossible to implement on EPOC. o select is missing. o binmode does not exist. (No CR LF to LF translation for text files) o EPOC does not handle the notion of current drive and current directory very well (i.e. not at all, but it tries hard to emulate one). See PATH. o Heap is limited to 4MB. o Dynamic loading is not implemented. Compiling Perl 5 on the EPOC cross compiling environment Sorry, this is far too short. o You will need the epocemx SDK from Eberhard Mattes. o Get the Perl sources from your nearest CPAN site. o Unpack the sources. o Build a native perl from this sources... Make sure to save the miniperl executable as miniperl.native. Start again from scratch cp epoc/* . ./Configure -S make cp miniperl.native miniperl touch miniperl.exe make perl createpkg.pl emxsis perl.pkg perl.sis SUPPORT STATUS OF PERL ON EPOC
I'm offering this port "as is". You can ask me questions, but I can't guarantee I'll be able to answer them. Since the port to epocemx is quite new, please check the web for updates first. Very special thanks to Eberhard Mattes for epocemx. AUTHOR
Olaf Flebbe <olaf@oflebbe.de> <http://www.oflebbe.de/perl/perl5.html> LAST UPDATE
2003-01-18 perl v5.16.2 2012-10-11 PERLEPOC(1)