Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^7: System() in list mode?

by Khen1950fx (Canon)
on Oct 19, 2011 at 05:54 UTC ( #932293=note: print w/replies, xml ) Need Help??


in reply to Re^6: System() in list mode?
in thread System() in list mode?

Which makes no sense if there is absolutely no shell interaction

That's not exactly correct. Remember the magic of Perl---the impossible is always possible. Here's an example. It requires: IPC::System::Simple.
!/usr/bin/perl -l use strict; use warnings; use IPC::System::Simple qw(capturex systemx); my $PATH = $ENV{'PATH'}; my $SHELL = $ENV{'SHELL'}; my $path = '/root/Desktop/test a folder/this script.sh'; my @arr1 = ( "printenv", "PATH" ); capturex(@arr1); my @arr2 = ( "echo", "$PATH" ); systemx(@arr2); my @arr3 = ("$SHELL", "$path"); my @script = system(@arr3);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://932293]
help
Chatterbox?
[Eily]: and since his name is a modified version of astérisque (asterisk), which is a typographical symbol, I think it's even funnier that he would lose a diacritic
[Eily]: the pun doesn't work so well with "he lost a diacritic" though :P
[LanX]: Obelix might offer to find it again ...
[LanX]: not much to translate anyway since Goscinny died
[Eily]: https://en. wikipedia.org/ wiki/List_of_Aster ix_characters some of the names were changed to include a new pun
[LanX]: sure some are even funnier now
[LanX]: some lost because they were not translated like Epidemais
[LanX]: some of the english names are funny too

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2017-05-24 15:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?