Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

exec
I would like to run a specific unix in a perl script. Would that be safier
than running it from within a php script?

--
Floor



Report this thread to moderator Post Follow-up to this message
Old Post
Floor
01-29-08 12:12 AM


Re: exec
In article <479df71c$0$85784$e4fe514c@news.xs4all.nl>, Floor
<Floor@yahooh.co.not> wrote:

> I would like to run a specific unix in a perl script. Would that be safier
> than running it from within a php script?

I'm sorry, but I don't understand what you mean by "run a specific unix
in a perl script". Can you explain?

--
Jim Gibson

Posted Via mcse.ms Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.mcse.ms

Report this thread to moderator Post Follow-up to this message
Old Post
Jim Gibson
01-29-08 12:12 AM


Re: exec
Jim Gibson:

> I'm sorry, but I don't understand what you mean by "run a specific unix
> in a perl script". Can you explain?

Sorry, typo; I mean that I would like to run a unix script in Perl; not a
'who' of 'pwd' command, but a script in which I do several cat's to a
document. Does a Perl source have a certain exec program part? I did the
command, but without any result...

thanks,
--
Floor



Report this thread to moderator Post Follow-up to this message
Old Post
Floor
01-29-08 01:13 PM


Re: exec
In article <479f1f98$0$85792$e4fe514c@news.xs4all.nl>, Floor
<Floor@yahooh.co.not> wrote:

> Jim Gibson:
> 
>
> Sorry, typo; I mean that I would like to run a unix script in Perl; not a
> 'who' of 'pwd' command, but a script in which I do several cat's to a
> document. Does a Perl source have a certain exec program part? I did the
> command, but without any result...

How about posting a short script that demonstrates the problem you are
having?

You can certainly execute a Unix shell script from a Perl program. Use
the system function or backtics (``) or the qx() operator, depending
upon if you wish to capture the standard output of the command you are
running.

See 'perldoc -f system' for details.

I do not understand your question "Does a Perl source have a certain
exec program part?". A Perl program is compiled and interpreted by the
Perl interpreter. The executable part of a Perl program is in memory at
the time of execution.

Perl has the 'exec' function, but I don't think that is what you are
asking about.

--
Jim Gibson

Posted Via mcse.ms Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.mcse.ms

Report this thread to moderator Post Follow-up to this message
Old Post
Jim Gibson
01-30-08 12:13 AM


Re: exec
Jim:

> How about posting a short script that demonstrates the problem you are
> having?

Sorry that I haven't been able to respond earlier, but this is how it goes:
I have this mailinglist script (Minimalist) that I converted into a GUI
manageable interface (nowadays an internet nono doesn't understand the
command structure of a mailinglist anymore :-)
With a 'cat' command I read out the contents of the e-mail adresses of the
subscribers and put it in one viewable textfile.
I now run that job in a crontab job that runs every 15 minutes.
It would be great if I can run that job at the start of the Perl script of
the mailinglist software. I allready tried to put the system line in it, but
as I am a complete nono on Perl, it didn't run (it did, but didn't make an
update to the online output file).

> You can certainly execute a Unix shell script from a Perl program. Use
> the system function or backtics (``) or the qx() operator, depending
> upon if you wish to capture the standard output of the command you are
> running.

I think there might be allway a security issue on this, but in this case it
will be the only alternative I am afraid.

> See 'perldoc -f system' for details.

Will do so, thanks

> I do not understand your question "Does a Perl source have a certain
> exec program part?". A Perl program is compiled and interpreted by the
> Perl interpreter. The executable part of a Perl program is in memory at
> the time of execution.

I am not an experienced Perl users, but as with Cobol, you have to put these
kins of commands in a certain part of the source code or else the command
wouldn't be executed.

just thinkin,

--
Floor



Report this thread to moderator Post Follow-up to this message
Old Post
Floor
02-03-08 01:10 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL Programming archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 02:42 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.