Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > How to run perl script which is loaded into a string?

Reply
Thread Tools

How to run perl script which is loaded into a string?

 
 
yong
Guest
Posts: n/a
 
      01-05-2006
I load some perl script from socket,and store them into some
strings.Can I send the strings to perl directly and run them?

thanks

 
Reply With Quote
 
 
 
 
Josef Moellers
Guest
Posts: n/a
 
      01-05-2006
yong wrote:
> I load some perl script from socket,and store them into some
> strings.Can I send the strings to perl directly and run them?


You can create a gaping security hole by using eval().

--
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett

 
Reply With Quote
 
 
 
 
yong
Guest
Posts: n/a
 
      01-05-2006
Thanks a lot.

And by the way,if I load the script to string with other language for
exmaple C,how can I do this?

thanks

 
Reply With Quote
 
Anno Siegel
Guest
Posts: n/a
 
      01-05-2006
yong <> wrote in comp.lang.perl.misc:
> Thanks a lot.
>
> And by the way,if I load the script to string with other language for
> exmaple C,how can I do this?


You ask a group that concerns itself with C.

Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
 
Reply With Quote
 
Samwyse
Guest
Posts: n/a
 
      01-05-2006
yong wrote:
> Thanks a lot.
>
> And by the way,if I load the script to string with other language for
> exmaple C,how can I do this?


Not nearly as easily. You need to write the string to a file, invoke
your favorite C compiler, and run the resulting executable. All of the
above needs to be done in a way that avoids collisions if multiple
instances of your parent script are running simultaneously.
 
Reply With Quote
 
Brian McCauley
Guest
Posts: n/a
 
      01-05-2006
yong wrote:

> And by the way,if I load the script to string with other language for
> exmaple C,how can I do this?


perldoc perlembed

 
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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
how to run perl script from a perl script? anywherenotes@gmail.com Perl Misc 6 04-13-2005 11:19 PM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM
Keeping track of which user controls need to be loaded and which not John ASP .Net 0 07-08-2003 09:26 AM
Re: how to programatically give assembly loaded from network the same trust as those loaded from local host? Marcelo Birnbach [MS] ASP .Net 0 06-27-2003 11:51 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57