Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Issue in executing more than one perl script from Single perl script

Reply
Thread Tools

Issue in executing more than one perl script from Single perl script

 
 
nilesh.sonawane@gmail.com
Guest
Posts: n/a
 
      11-01-2007
Hi,
I am calling "1.pl" from "main.pl" file.
using
#main.pl
system ("perl 1.pl");

In this case it works fine.

But when I am doing
#main.pl
system ("perl 1.pl");
system ("perl 2.pl");

then it doesn't executes "1.pl" properly.
So I would like to know, is there any constraint for this? Do I need
to take any precautions for this?

Thanks,

 
Reply With Quote
 
 
 
 
Tad McClellan
Guest
Posts: n/a
 
      11-01-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) <(E-Mail Removed)> wrote:

> But when I am doing
> #main.pl
> system ("perl 1.pl");
> system ("perl 2.pl");
>
> then it doesn't executes "1.pl" properly.



You need to provide some symptoms if you hope for a diagnosis.

How do you know that it did not execute properly?

What did you observe?

Were any messages issued?

....


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
 
Reply With Quote
 
 
 
 
Jim.Lane@cibc.com
Guest
Posts: n/a
 
      11-01-2007
On Nov 1, 2:52 am, (E-Mail Removed) wrote:
> Hi,
> I am calling "1.pl" from "main.pl" file.
> using
> #main.pl
> system ("perl 1.pl");
>
> In this case it works fine.
>
> But when I am doing
> #main.pl
> system ("perl 1.pl");
> system ("perl 2.pl");
>
> then it doesn't executes "1.pl" properly.
> So I would like to know, is there any constraint for this? Do I need
> to take any precautions for this?
>
> Thanks,


Why are you using system() for this? AFAIK it forks a
whole new process - a lot of overhead to go to.
Isn't this what the "require" facility is for?

FWIW

Jim Lane

 
Reply With Quote
 
Josef Moellers
Guest
Posts: n/a
 
      11-01-2007
(E-Mail Removed) wrote:
> On Nov 1, 2:52 am, (E-Mail Removed) wrote:
>> Hi,
>> I am calling "1.pl" from "main.pl" file.
>> using
>> #main.pl
>> system ("perl 1.pl");
>>
>> In this case it works fine.
>>
>> But when I am doing
>> #main.pl
>> system ("perl 1.pl");
>> system ("perl 2.pl");
>>
>> then it doesn't executes "1.pl" properly.
>> So I would like to know, is there any constraint for this? Do I need
>> to take any precautions for this?
>>
>> Thanks,

>
> Why are you using system() for this? AFAIK it forks a
> whole new process - a lot of overhead to go to.
> Isn't this what the "require" facility is for?


Using system, you start a completely new program which executes on its
own, in its own context and e.g. is not required to be a Perl program at
all.

OTOH "require" will include the Perl program code into the current
program code.

--
Mails please to josef dot moellers
and I'm on gmx dot de.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can one declare more than one signal on one line? Merciadri Luca VHDL 4 11-01-2010 02:00 PM
hibernate mapping for more than one foreign key to a single table snehasish Java 0 10-27-2009 09:53 AM
JSpinner return more than one value after single pressed ereuseen Java 8 08-16-2007 01:28 AM
More than a single script block within a single HEAD and BODY Water Cooler v2 Javascript 2 04-18-2006 11:00 AM
can we access more than one xml file from one single xls file. sachin XML 1 12-01-2005 09:56 AM



Advertisments